diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/OrdersTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/OrdersTest.php index 11a2216b6668..5d1f5847e841 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/OrdersTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/OrdersTest.php @@ -7,6 +7,7 @@ namespace Magento\GraphQl\Sales; +use Exception; use Magento\Integration\Api\CustomerTokenServiceInterface; use Magento\TestFramework\TestCase\GraphQlAbstract; use Magento\TestFramework\Helper\Bootstrap; @@ -99,6 +100,25 @@ public function testOrdersQuery() } } + /** + * @expectedException Exception + * @expectedExceptionMessage The current customer isn't authorized. + */ + public function testOrdersQueryNotAuthorized() + { + $query = <<graphQlQuery($query); + } + /** * @param string $email * @param string $password