Skip to content

Commit 1afc4b0

Browse files
authored
ENGCOM-6160: magento/graphql-ce#1009: [Test Coverage] Cover exception in SalesGraphQl\Model\Resolver\Orders #1028
2 parents 5c8ed12 + 4f5a5b3 commit 1afc4b0

File tree

1 file changed

+20
-0
lines changed
  • dev/tests/api-functional/testsuite/Magento/GraphQl/Sales

1 file changed

+20
-0
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/OrdersTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\GraphQl\Sales;
99

10+
use Exception;
1011
use Magento\Integration\Api\CustomerTokenServiceInterface;
1112
use Magento\TestFramework\TestCase\GraphQlAbstract;
1213
use Magento\TestFramework\Helper\Bootstrap;
@@ -99,6 +100,25 @@ public function testOrdersQuery()
99100
}
100101
}
101102

103+
/**
104+
* @expectedException Exception
105+
* @expectedExceptionMessage The current customer isn't authorized.
106+
*/
107+
public function testOrdersQueryNotAuthorized()
108+
{
109+
$query = <<<QUERY
110+
{
111+
customerOrders {
112+
items {
113+
increment_id
114+
grand_total
115+
}
116+
}
117+
}
118+
QUERY;
119+
$this->graphQlQuery($query);
120+
}
121+
102122
/**
103123
* @param string $email
104124
* @param string $password

0 commit comments

Comments
 (0)