Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
add activity message test
Browse files Browse the repository at this point in the history
Ref: #5
  • Loading branch information
wellingguzman committed Apr 9, 2018
1 parent a93b9a8 commit 5e112c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/io/ActivityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,22 @@ public function testGetActivity()
]);
}

public function testCreateMessage()
{
$response = request_post('activity/message', [
'message' => 'comment'
], ['query' => ['access_token' => 'token']]);

assert_response($this, $response, [
'data' => 'object'
]);

assert_response_data_contains($this, $response, [
'type' => DirectusActivityTableGateway::TYPE_MESSAGE,
'message' => 'comment'
]);
}

protected function truncateTable()
{
truncate_table($this->db, 'directus_activity');
Expand Down

0 comments on commit 5e112c5

Please sign in to comment.