Skip to content
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

[API] Add contract test to admin ProductVariant #12745

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

arti0090
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT

@arti0090 arti0090 requested a review from a team as a code owner June 23, 2021 09:18
@probot-autolabeler probot-autolabeler bot added API APIs related issues and PRs. Maintenance CI configurations, READMEs, releases, etc. labels Jun 23, 2021
@arti0090 arti0090 force-pushed the productVariant-serialization branch from f41f401 to 2570d24 Compare June 23, 2021 09:23
tests/Api/Admin/ProductVariantTest.php Outdated Show resolved Hide resolved
tests/Api/Admin/ProductVariantTest.php Outdated Show resolved Hide resolved
tests/Api/Admin/ProductVariantTest.php Outdated Show resolved Hide resolved
tests/Api/Admin/ProductVariantTest.php Outdated Show resolved Hide resolved
@arti0090 arti0090 force-pushed the productVariant-serialization branch from 2570d24 to 201d7d5 Compare June 23, 2021 11:54
tests/Api/Admin/ProductVariantTest.php Outdated Show resolved Hide resolved
@arti0090 arti0090 force-pushed the productVariant-serialization branch 2 times, most recently from 68efdd6 to 3e12582 Compare June 24, 2021 05:37
@arti0090 arti0090 force-pushed the productVariant-serialization branch from 3e12582 to 2dcc1b0 Compare June 24, 2021 05:54
public function __construct(
ProductVariantPricesCalculatorInterface $priceCalculator,
ChannelContextInterface $channelContext,
AvailabilityCheckerInterface $availabilityChecker
AvailabilityCheckerInterface $availabilityChecker,
SectionProviderInterface $uriBasedSectionContext
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
SectionProviderInterface $uriBasedSectionContext
SectionProviderInterface $sectionContext

final class ProductVariantTest extends JsonApiTestCase
{
/** @test */
public function it_denies_access_to_a_products_list_for_not_authenticated_user(): void
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public function it_denies_access_to_a_products_list_for_not_authenticated_user(): void
public function it_denies_access_to_an_admin_products_list_for_not_authenticated_user(): void

}

/** @test */
public function it_gets_all_product_variants(): void
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public function it_gets_all_product_variants(): void
public function it_gets_all_product_variants_for_authorized_administrator(): void

@lchrusciel lchrusciel merged commit e6d1724 into Sylius:master Jun 24, 2021
@lchrusciel
Copy link
Member

Thanks, @arti0090! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API APIs related issues and PRs. Maintenance CI configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants