Skip to content

Commit

Permalink
ENGCOM-6160: magento/graphql-ce#1009: [Test Coverage] Cover exception…
Browse files Browse the repository at this point in the history
… in SalesGraphQl\Model\Resolver\Orders #1028
  • Loading branch information
lenaorobei authored Oct 28, 2019
2 parents 5c8ed12 + 4f5a5b3 commit 1afc4b0
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 1afc4b0

Please sign in to comment.