File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
dev/tests/api-functional/testsuite/Magento/GraphQl/Sales Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \GraphQl \Sales ;
99
10+ use Exception ;
1011use Magento \Integration \Api \CustomerTokenServiceInterface ;
1112use Magento \TestFramework \TestCase \GraphQlAbstract ;
1213use 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
You can’t perform that action at this time.
0 commit comments