Skip to content

Commit

Permalink
MDL-63130 core_message: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Sep 6, 2018
1 parent 6e2fc5e commit af142c1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions message/tests/messagelib_test.php
Expand Up @@ -270,6 +270,18 @@ public function test_message_count_unread_messages_with_deleted_messages() {
$this->assertEquals(0, message_count_unread_messages($userto, $userfrom1));
}

/**
* Test message_count_unread_messages with sent messages.
*/
public function test_message_count_unread_messages_with_sent_messages() {
$userfrom = $this->getDataGenerator()->create_user();
$userto = $this->getDataGenerator()->create_user();

$this->send_fake_message($userfrom, $userto);

$this->assertEquals(0, message_count_unread_messages($userfrom));
}

/**
* Test message_add_contact.
*/
Expand Down

0 comments on commit af142c1

Please sign in to comment.