Skip to content

Commit

Permalink
Fix test in ResourceBundle (taken from #10062)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Jan 8, 2019
1 parent e986b7f commit df2b679
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions test/app/config/routing.yml
Expand Up @@ -4,15 +4,15 @@ app_book:
type: sylius.resource_api

app_book_sortable_index:
path: /books/sortable/
path: /sortable-books/
methods: [GET]
defaults:
_controller: app.controller.book:indexAction
_sylius:
sortable: true

app_book_filterable_index:
path: /books/filterable/
path: /filterable-books/
methods: [GET]
defaults:
_controller: app.controller.book:indexAction
Expand All @@ -24,7 +24,7 @@ app_versioned_book:
prefix: /v{version}

app_create_book_with_custom_factory:
path: /books/create-custom
path: /create-custom-book
methods: [POST]
defaults:
_controller: app.controller.book:createAction
Expand Down
10 changes: 5 additions & 5 deletions test/src/Tests/Controller/BookApiTest.php
Expand Up @@ -161,7 +161,7 @@ public function it_does_not_apply_sorting_for_un_existing_field()
{
$this->loadFixturesFromFile('more_books.yml');

$this->client->request('GET', '/books/sortable/', ['sorting' => ['name' => 'DESC']]);
$this->client->request('GET', '/sortable-books/', ['sorting' => ['name' => 'DESC']]);
$response = $this->client->getResponse();

$this->assertResponseCode($response, Response::HTTP_OK);
Expand All @@ -174,7 +174,7 @@ public function it_does_not_apply_filtering_for_un_existing_field()
{
$this->loadFixturesFromFile('more_books.yml');

$this->client->request('GET', '/books/filterable/', ['criteria' => ['name' => 'John']]);
$this->client->request('GET', '/filterable-books/', ['criteria' => ['name' => 'John']]);
$response = $this->client->getResponse();

$this->assertResponseCode($response, Response::HTTP_OK);
Expand All @@ -187,7 +187,7 @@ public function it_applies_sorting_for_existing_field()
{
$this->loadFixturesFromFile('more_books.yml');

$this->client->request('GET', '/books/sortable/', ['sorting' => ['id' => 'DESC']]);
$this->client->request('GET', '/sortable-books/', ['sorting' => ['id' => 'DESC']]);
$response = $this->client->getResponse();

$this->assertResponseCode($response, Response::HTTP_OK);
Expand All @@ -200,7 +200,7 @@ public function it_applies_filtering_for_existing_field()
{
$this->loadFixturesFromFile('more_books.yml');

$this->client->request('GET', '/books/filterable/', ['criteria' => ['author' => 'J.R.R. Tolkien']]);
$this->client->request('GET', '/filterable-books/', ['criteria' => ['author' => 'J.R.R. Tolkien']]);
$response = $this->client->getResponse();

$this->assertResponseCode($response, Response::HTTP_OK);
Expand All @@ -223,7 +223,7 @@ public function it_allows_creating_a_book_via_custom_factory()
}
EOT;

$this->client->request('POST', '/books/create-custom', [], [], ['CONTENT_TYPE' => 'application/json'], $data);
$this->client->request('POST', '/create-custom-book', [], [], ['CONTENT_TYPE' => 'application/json'], $data);
$response = $this->client->getResponse();
$this->assertResponse($response, 'books/create_response', Response::HTTP_CREATED);
}
Expand Down

0 comments on commit df2b679

Please sign in to comment.