diff --git a/tests/io/ActivityTest.php b/tests/io/ActivityTest.php index 2a042f53c5..21bcc5c531 100644 --- a/tests/io/ActivityTest.php +++ b/tests/io/ActivityTest.php @@ -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');