public function testUserHaveNotPermissionButIsAdmin() { RoutePermission::setRoutePermissions('POST /blog/{id}', ['create-blog']); RoutePermission::setRouteRoles('POST /blog/{id}', ['creator', 'admin']); $credentials = ['email' => '*****@*****.**', 'password' => '123456']; $token = JWTAuth::attempt($credentials); $res = $this->call('POST', '/blog/1', [], [], [], ['HTTP_Authorization' => "Bearer {$token}"]); $this->assertEquals(200, $res->getStatusCode()); }