Skip to content

Commit

Permalink
[Test][Api/Admin] Remove locale from POST/PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojdylak committed Nov 15, 2023
1 parent bf7636d commit b433e75
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 26 deletions.
3 changes: 0 additions & 3 deletions tests/Api/Admin/CatalogPromotionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public function it_creates_a_catalog_promotion(): void
],
],
'translations' => ['en_US' => [
'locale' => 'en_US',
'label' => 'T-Shirts discount',
'description' => '50% discount on every T-Shirt',
]],
Expand Down Expand Up @@ -271,7 +270,6 @@ public function it_does_not_create_a_catalog_promotion_with_invalid_scopes(): vo
],
],
'translations' => ['en_US' => [
'locale' => 'en_US',
'label' => 'T-Shirts discount',
'description' => '50% discount on every T-Shirt',
]],
Expand Down Expand Up @@ -370,7 +368,6 @@ public function it_does_not_create_a_catalog_promotion_with_invalid_actions(): v
],
],
'translations' => ['en_US' => [
'locale' => 'en_US',
'label' => 'T-Shirts discount',
'description' => '50% discount on every T-Shirt',
]],
Expand Down
1 change: 0 additions & 1 deletion tests/Api/Admin/ProductAssociationTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function it_creates_product_association_type(): void
'translations' => ['en_US' => [
'name' => 'test',
'description' => 'test description',
'locale' => 'en_US'
]]
], JSON_THROW_ON_ERROR),
);
Expand Down
16 changes: 0 additions & 16 deletions tests/Api/Admin/ProductAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public function it_creates_a_text_product_attribute(): void
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -140,7 +139,6 @@ public function it_creates_a_textarea_product_attribute(): void
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -170,7 +168,6 @@ public function it_creates_a_checkbox_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'New',
],
],
Expand Down Expand Up @@ -200,7 +197,6 @@ public function it_creates_an_integer_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Pages',
],
],
Expand Down Expand Up @@ -230,7 +226,6 @@ public function it_creates_a_float_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Display size',
],
],
Expand Down Expand Up @@ -260,7 +255,6 @@ public function it_creates_a_percent_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Damage reduction',
],
],
Expand Down Expand Up @@ -293,7 +287,6 @@ public function it_creates_a_datetime_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Published at',
],
],
Expand Down Expand Up @@ -326,7 +319,6 @@ public function it_creates_a_date_product_attribute(): void
'translatable' => false,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Published at',
],
],
Expand Down Expand Up @@ -370,7 +362,6 @@ public function it_creates_a_select_product_attribute(): void
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -419,7 +410,6 @@ public function it_does_not_create_a_product_attribute_with_unregistered_type():
'type' => 'foobar',
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Test',
],
],
Expand Down Expand Up @@ -453,7 +443,6 @@ public function it_does_not_create_a_text_product_attribute_with_invalid_configu
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -497,7 +486,6 @@ public function it_does_not_create_a_select_product_attribute_with_disabled_mult
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -541,7 +529,6 @@ public function it_does_not_create_a_select_product_attribute_with_invalid_max_e
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -584,7 +571,6 @@ public function it_does_not_create_a_select_product_attribute_with_invalid_min_e
'translatable' => true,
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Material',
],
],
Expand Down Expand Up @@ -641,11 +627,9 @@ public function it_updates_a_product_attribute(): void
'/api/v2/admin/product-attribute-translations/%s',
$productAttribute->getTranslation('en_US')->getId(),
),
'locale' => 'en_US',
'name' => 'Additional information',
],
'pl_PL' => [
'locale' => 'pl_PL',
'name' => 'Dodatkowe informacje',
],
]
Expand Down
3 changes: 0 additions & 3 deletions tests/Api/Admin/ProductVariantsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function it_creates_a_product_variant_with_all_optional_data(): void
]],
'translations' => [
'en_US' => [
'locale' => 'en_US',
'name' => 'Red mug',
],
],
Expand Down Expand Up @@ -285,7 +284,6 @@ public function it_does_not_allow_to_create_product_variant_with_invalid_locale_
]],
'translations' => [
'NON-EXISTING-LOCALE-CODE' => [
'locale' => 'NON-EXISTING-LOCALE-CODE',
'name' => 'Yellow mug',
],
],
Expand Down Expand Up @@ -384,7 +382,6 @@ public function it_does_not_allow_to_update_product_variant_with_invalid_locale_
]],
'translations' => [
'NON-EXISTING-LOCALE-CODE' => [
'locale' => 'NON-EXISTING-LOCALE-CODE',
'name' => 'Yellow mug',
],
],
Expand Down
1 change: 0 additions & 1 deletion tests/Api/Admin/PromotionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function it_creates_promotion(): void
'code' => 'tshirts_discount',
'appliesToDiscounted' => false,
'translations' => ['en_US' => [
'locale' => 'en_US',
'label' => 'T-Shirts discount',
]],
], JSON_THROW_ON_ERROR),
Expand Down
2 changes: 0 additions & 2 deletions tests/Api/Admin/TaxonsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function it_creates_a_taxon(): void
'en_US' => [
'name' => 'Watches',
'slug' => 'watches',
'locale' => 'en_US'
]
]
], JSON_THROW_ON_ERROR),
Expand Down Expand Up @@ -126,7 +125,6 @@ public function it_does_not_create_a_taxon_with_taken_code(): void
'en_US' => [
'name' => 'Watches',
'slug' => 'watches',
'locale' => 'en_US'
]
]
], JSON_THROW_ON_ERROR),
Expand Down

0 comments on commit b433e75

Please sign in to comment.