Skip to content

Commit

Permalink
Fixed api-functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
ldusan84 committed Feb 14, 2019
1 parent 5bf7364 commit 8d828da
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
use Magento\Catalog\Api\Data\CategoryInterface;
use Magento\Catalog\Model\ResourceModel\Category\Collection as CategoryCollection;
use Magento\Framework\DataObject;
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
use Magento\TestFramework\TestCase\GraphQlAbstract;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\TestFramework\ObjectManager;


class CategoryTest extends GraphQlAbstract
{
/**
Expand Down Expand Up @@ -122,9 +124,9 @@ public function testNonExistentCategoryWithProductCount()
}
QUERY;

$response = $this->graphQlQuery($query);
$expectedResponse = ['errors' => ['message' => 'Category doesn\'t exist']];
$this->assertEquals($expectedResponse, $response);
$this->expectException(GraphQlNoSuchEntityException::class);
$this->expectExceptionMessage('GraphQL response contains errors: Category doesn\'t exist');
$this->graphQlQuery($query);
}

/**
Expand Down

0 comments on commit 8d828da

Please sign in to comment.