Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-02-06 20:11:44 +0300
committerJoas Schilling <coding@schilljs.com>2018-02-20 19:47:54 +0300
commitd63caf5829fd3f69f5b42a75cc50bf2fc267582b (patch)
treedc84cc7d84b9538703a6327de214a250ed395e7a /tests
parenta3de507b7626919a42ef6a86d94af30b0f04f3a9 (diff)
Better result handling of email search
1. Local users should not be returned when searching for empty string 2. The limit of the response should be respected Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Collaboration/Collaborators/MailPluginTest.php4
-rw-r--r--tests/lib/Collaboration/Collaborators/RemotePluginTest.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
index b728ae521e2..9c4836c2eb3 100644
--- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
@@ -103,7 +103,7 @@ class MailPluginTest extends TestCase {
->with($searchTerm, ['EMAIL', 'FN'])
->willReturn($contacts);
- $moreResults = $this->plugin->search($searchTerm, 0, 0, $this->searchResult);
+ $moreResults = $this->plugin->search($searchTerm, 2, 0, $this->searchResult);
$result = $this->searchResult->asArray();
$this->assertSame($exactIdMatch, $this->searchResult->hasExactIdMatch(new SearchResultType('emails')));
@@ -398,7 +398,7 @@ class MailPluginTest extends TestCase {
return in_array($group, $userToGroupMapping[$userId]);
});
- $moreResults = $this->plugin->search($searchTerm, 0, 0, $this->searchResult);
+ $moreResults = $this->plugin->search($searchTerm, 2, 0, $this->searchResult);
$result = $this->searchResult->asArray();
$this->assertSame($exactIdMatch, $this->searchResult->hasExactIdMatch(new SearchResultType('emails')));
diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
index 5c4b3af5e70..aa009a7134b 100644
--- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
@@ -94,7 +94,7 @@ class RemotePluginTest extends TestCase {
->with($searchTerm, ['CLOUD', 'FN'])
->willReturn($contacts);
- $moreResults = $this->plugin->search($searchTerm, 0, 0, $this->searchResult);
+ $moreResults = $this->plugin->search($searchTerm, 2, 0, $this->searchResult);
$result = $this->searchResult->asArray();
$this->assertSame($exactIdMatch, $this->searchResult->hasExactIdMatch(new SearchResultType('remotes')));