Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
#1009: [Test Coverage] Cover exception in SalesGraphQl\Model\Resolver…
Browse files Browse the repository at this point in the history
…\Orders
  • Loading branch information
atwixfirster committed Oct 23, 2019
1 parent 0583fc3 commit 7b345f0
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -99,6 +100,25 @@ public function testOrdersQuery()
}
}

/**
* @expectedException Exception
* @expectedExceptionMessage The current customer isn't authorized.
*/
public function testOrdersQueryNotAuthorized()
{
$query = <<<QUERY
{
customerOrders {
items {
increment_id
grand_total
}
}
}
QUERY;
$this->graphQlQuery($query);
}

/**
* @param string $email
* @param string $password
Expand Down

0 comments on commit 7b345f0

Please sign in to comment.