More teams service tests
This commit is contained in:
parent
7799ef47ec
commit
3ee4328fa2
1 changed files with 11 additions and 7 deletions
|
@ -56,8 +56,6 @@ trait TeamsBaseClient
|
|||
'url' => 'http://localhost:5000/join-us#title'
|
||||
]);
|
||||
|
||||
if ($response['headers']['status-code'] !== 201) {var_dump($response);}
|
||||
|
||||
$this->assertEquals(201, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']['$uid']);
|
||||
$this->assertNotEmpty($response['body']['userId']);
|
||||
|
@ -69,12 +67,18 @@ trait TeamsBaseClient
|
|||
/**
|
||||
* Test for FAILURE
|
||||
*/
|
||||
// $response = $this->client->call(Client::METHOD_POST, '/teams/'.$uid.'/memberships', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$uid'],
|
||||
// ], $this->getHeaders()));
|
||||
|
||||
// $this->assertEquals(404, $response['headers']['status-code']);
|
||||
$response = $this->client->call(Client::METHOD_POST, '/teams/'.$uid.'/memberships', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$uid'],
|
||||
], $this->getHeaders()), [
|
||||
'email' => 'dasdkaskdjaskdjasjkd',
|
||||
'name' => 'Friend User',
|
||||
'roles' => ['admin', 'editor'],
|
||||
'url' => 'http://localhost:5000/join-us#title'
|
||||
]);
|
||||
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue