More teams service tests
This commit is contained in:
parent
7799ef47ec
commit
3ee4328fa2
|
@ -56,8 +56,6 @@ trait TeamsBaseClient
|
||||||
'url' => 'http://localhost:5000/join-us#title'
|
'url' => 'http://localhost:5000/join-us#title'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($response['headers']['status-code'] !== 201) {var_dump($response);}
|
|
||||||
|
|
||||||
$this->assertEquals(201, $response['headers']['status-code']);
|
$this->assertEquals(201, $response['headers']['status-code']);
|
||||||
$this->assertNotEmpty($response['body']['$uid']);
|
$this->assertNotEmpty($response['body']['$uid']);
|
||||||
$this->assertNotEmpty($response['body']['userId']);
|
$this->assertNotEmpty($response['body']['userId']);
|
||||||
|
@ -69,12 +67,18 @@ trait TeamsBaseClient
|
||||||
/**
|
/**
|
||||||
* Test for FAILURE
|
* 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 [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue