-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GraphQL-55: [Mutations] My Account > Change account information
-- fixes after merge with mainline
- Loading branch information
Valeriy Nayda
committed
Oct 9, 2018
1 parent
706af91
commit a1c4d33
Showing
5 changed files
with
19 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
namespace Magento\GraphQl\Customer; | ||
|
||
use Magento\Integration\Api\CustomerTokenServiceInterface; | ||
use Magento\TestFramework\ObjectManager; | ||
use Magento\TestFramework\TestCase\GraphQlAbstract; | ||
|
||
|
@@ -16,7 +17,6 @@ | |
class RevokeCustomerTokenTest extends GraphQlAbstract | ||
{ | ||
/** | ||
* Verify customers with valid credentials | ||
* @magentoApiDataFixture Magento/Customer/_files/customer.php | ||
*/ | ||
public function testRevokeCustomerTokenValidCredentials() | ||
|
@@ -30,8 +30,7 @@ public function testRevokeCustomerTokenValidCredentials() | |
$userName = '[email protected]'; | ||
$password = 'password'; | ||
/** @var CustomerTokenServiceInterface $customerTokenService */ | ||
$customerTokenService = ObjectManager::getInstance() | ||
->get(\Magento\Integration\Api\CustomerTokenServiceInterface::class); | ||
$customerTokenService = ObjectManager::getInstance()->get(CustomerTokenServiceInterface::class); | ||
$customerToken = $customerTokenService->createCustomerAccessToken($userName, $password); | ||
|
||
$headerMap = ['Authorization' => 'Bearer ' . $customerToken]; | ||
|
@@ -40,7 +39,8 @@ public function testRevokeCustomerTokenValidCredentials() | |
} | ||
|
||
/** | ||
* Verify guest customers | ||
* @expectedException \Exception | ||
* @expectedExceptionMessage The current customer isn't authorized. | ||
*/ | ||
public function testRevokeCustomerTokenForGuestCustomer() | ||
{ | ||
|
@@ -49,11 +49,6 @@ public function testRevokeCustomerTokenForGuestCustomer() | |
revokeCustomerToken | ||
} | ||
QUERY; | ||
$this->expectException(\Exception::class); | ||
$this->expectExceptionMessage( | ||
'GraphQL response contains errors: Current customer' . ' ' . | ||
'does not have access to the resource "customer"' | ||
); | ||
$this->graphQlQuery($query, [], ''); | ||
} | ||
} |