mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Remove console restrictions
This commit is contained in:
@@ -70,9 +70,37 @@ class ConsoleTest extends TestCase
|
||||
'failure' => 'http://localhost/failure',
|
||||
]);
|
||||
|
||||
var_dump();
|
||||
$session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console'];
|
||||
var_dump($response['headers']);
|
||||
$this->assertEquals('http://localhost/success', $response['headers']['location']);
|
||||
$this->assertEquals("\n", $response['body']);
|
||||
|
||||
return ['session' => $session];
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testLoginSuccess
|
||||
*/
|
||||
public function testLogoutSuccess($data)
|
||||
{
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/auth/logout', [
|
||||
'origin' => 'http://localhost',
|
||||
'content-type' => 'application/json',
|
||||
'cookie' => 'a-session-console=' . $data['session'],
|
||||
], []);
|
||||
|
||||
var_dump($response);
|
||||
$this->assertEquals('http://localhost/success', $response['headers']['location']);
|
||||
$this->assertEquals("\n", $response['body']);
|
||||
}
|
||||
|
||||
// public function testLogoutFailure()
|
||||
// {
|
||||
// $response = $this->client->call(Client::METHOD_DELETE, '/auth/logout', [
|
||||
// 'origin' => 'http://localhost',
|
||||
// 'content-type' => 'application/json',
|
||||
// ], []);
|
||||
|
||||
// $this->assertEquals('401', $response['body']['code']);
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user