Skip to content
Browse files

MDL-37164 message - fix broken unit tests

We have fixed the returning of the guest user now
  • Loading branch information...
1 parent 4c5dc0e commit 61a73b43c13da988872aab4125a43d0ced322ae9 @danpoltawski danpoltawski committed Feb 5, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 message/tests/externallib_test.php
View
5 message/tests/externallib_test.php
@@ -351,12 +351,11 @@ public function test_search_contacts() {
$user5 = self::getDataGenerator()->create_user($user5);
self::getDataGenerator()->enrol_user($user5->id, $course2->id);
- // Searching for users, keep in mind that 'Admin User' and 'Guest user' can be returned for now.
- // See MDL-37164 which should fix that. Once fixed, remove the +2's.
$this->setUser($user1);
$results = core_message_external::search_contacts('r');
$results = external_api::clean_returnvalue(core_message_external::search_contacts_returns(), $results);
- $this->assertCount(4 + 2, $results);
+ // Should return the 4 users created above with the letter 'r' in name and the admin [admin useR].
+ $this->assertCount(4 + 1, $results);
$results = core_message_external::search_contacts('r', true);
$results = external_api::clean_returnvalue(core_message_external::search_contacts_returns(), $results);
$this->assertCount(2, $results);

0 comments on commit 61a73b4

Please sign in to comment.
Something went wrong with that request. Please try again.