File tree Expand file tree Collapse file tree 3 files changed +1
-13
lines changed
app/code/Magento/Integration
dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User Expand file tree Collapse file tree 3 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ public function revokeAdminAccessToken($adminId)
110
110
{
111
111
$ tokenCollection = $ this ->tokenModelCollectionFactory ->create ()->addFilterByAdminId ($ adminId );
112
112
if ($ tokenCollection ->getSize () == 0 ) {
113
- throw new LocalizedException ( __ ( ' This user has no tokens. ' )) ;
113
+ return true ;
114
114
}
115
115
try {
116
116
foreach ($ tokenCollection as $ token ) {
Original file line number Diff line number Diff line change @@ -99,10 +99,6 @@ public function testRevokeAdminAccessToken()
99
99
$ this ->assertTrue ($ this ->_tokenService ->revokeAdminAccessToken ($ adminId ));
100
100
}
101
101
102
- /**
103
- * @expectedException \Magento\Framework\Exception\LocalizedException
104
- * @expectedExceptionMessage This user has no tokens.
105
- */
106
102
public function testRevokeAdminAccessTokenWithoutAdminId ()
107
103
{
108
104
$ this ->_tokenModelCollectionMock ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -89,10 +89,6 @@ public function testInvalidateTokenNoTokens()
89
89
// invalidate token
90
90
$ this ->getRequest ()->setParam ('user_id ' , $ adminUserId );
91
91
$ this ->dispatch ('backend/admin/user/invalidateToken ' );
92
- $ this ->assertSessionMessages (
93
- $ this ->equalTo (['This user has no tokens. ' ]),
94
- MessageInterface::TYPE_ERROR
95
- );
96
92
}
97
93
98
94
public function testInvalidateTokenNoUser ()
@@ -110,9 +106,5 @@ public function testInvalidateTokenInvalidUser()
110
106
// invalidate token
111
107
$ this ->getRequest ()->setParam ('user_id ' , $ adminUserId );
112
108
$ this ->dispatch ('backend/admin/user/invalidateToken ' );
113
- $ this ->assertSessionMessages (
114
- $ this ->equalTo (['This user has no tokens. ' ]),
115
- MessageInterface::TYPE_ERROR
116
- );
117
109
}
118
110
}
You can’t perform that action at this time.
0 commit comments