@@ -67,7 +67,7 @@ public function testGetAllConversations()
6767 $ this ->assertEquals ('536e564f316c83104c000020 ' , $ conversations ['0 ' ]['user ' ]['id ' ]);
6868 $ this ->assertEquals ('admin ' , $ conversations ['0 ' ]['assignee ' ]['type ' ]);
6969 }
70-
70+
7171 public function testGetUserConversations ()
7272 {
7373 $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
@@ -76,7 +76,7 @@ public function testGetUserConversations()
7676
7777 $ this ->assertRequest ('GET ' , '/conversations?type=user ' );
7878 }
79-
79+
8080 public function testGetAdminConversations ()
8181 {
8282 $ this ->setMockResponse ($ this ->client , 'Conversation/ConversationList.txt ' );
@@ -111,6 +111,13 @@ public function testReplyToConversationAsAdmin() {
111111 $ this ->assertRequestJson (['admin_id ' => '6 ' , 'type ' => 'admin ' , 'body ' => 'my reply ' , 'message_type ' => 'comment ' ]);
112112 }
113113
114+ public function testAssignConversationAsAdmin () {
115+ $ this ->setMockResponse ($ this ->client , 'Conversation/Conversation.txt ' );
116+ $ this ->client ->replyToConversation (['id ' => '123456 ' , 'admin_id ' => '6 ' , 'type ' => 'admin ' , 'message_type ' => 'assignment ' , 'assignee_id ' => '7 ' ]);
117+ $ this ->assertRequest ('POST ' , '/conversations/123456/reply ' );
118+ $ this ->assertRequestJson (['admin_id ' => '6 ' , 'assignee_id ' => '7 ' , 'type ' => 'admin ' , 'message_type ' => 'assignment ' ]);
119+ }
120+
114121 public function testMarkConversationAsRead ()
115122 {
116123 $ this ->setMockResponse ($ this ->client , 'Conversation/Conversation.txt ' );
0 commit comments