Skip to content

Update ThemesIndexControllerTest.php #541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LeonardoPagani
Copy link

#536
This pull request is a:

  • [X ] change of existing behavior

Checklist

  • [X ] Unit tests are passing

What you did

As part of my Trainee assessment for a summer internship at passbolt to update an existing unit test as described in task #536. I have completed this task and am opening a pull request with my changes.

Updated ThemeIndexControllerTest.php to use Fixture Factories instead of legacy fixtures.

removed:
public $fixtures = [
'plugin.Passbolt/AccountSettings.AccountSettings',
];

modified testThemesIndexSucess() to use fixture factoring as it requires a user to be created and authenticated.

did not alter testThemesIndexErrorNotAuthenticated() as no factory is needed.

@CLAassistant
Copy link

CLAassistant commented May 3, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

// Authenticate as ada and list the themes
$this->logInAsUser();
$this->logInAs($user);
$this->get('/account/settings/themes.json?api-version=v2');
$this->assertResponseOk();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to add an assertion here, ensuring that the theme midgar is well returned in the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants