MDL-56407 message: Additional unit test for unblocked user
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 22 Nov 2016 01:45:52 +0000 (09:45 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 22 Nov 2016 01:45:52 +0000 (09:45 +0800)
message/tests/api_test.php

index 8883993..c6ff6b4 100644 (file)
@@ -846,6 +846,10 @@ class core_message_api_testcase extends core_message_messagelib_testcase {
 
         // User should be blocked.
         $this->assertTrue(\core_message\api::is_user_blocked($user1->id, $user2->id));
+
+        // Unblock the user.
+        message_unblock_contact($user2->id);
+        $this->assertFalse(\core_message\api::is_user_blocked($user1->id, $user2->id));
     }
 
     /**