From 85580cd243d41fb32adbc5901c7cc25b5de78c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 18 Nov 2015 21:08:50 +0100 Subject: [PATCH] fix user_search spec --- spec/models/user_search_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/models/user_search_spec.rb b/spec/models/user_search_spec.rb index 2692f0314..efcee0b82 100644 --- a/spec/models/user_search_spec.rb +++ b/spec/models/user_search_spec.rb @@ -70,7 +70,7 @@ describe UserSearch do expect(results).to include(user6) expect(search_for("mr", searching_user: moderator).size).to eq(6) - results = search_for("mrb", searching_user: admin) + results = search_for(user1.username, searching_user: admin) expect(results.size).to eq(3) results = search_for("MR", searching_user: admin) @@ -80,13 +80,13 @@ describe UserSearch do expect(results.size).to eq(2) # topic priority - results = search_for("mrb", topic_id: topic.id) + results = search_for(user1.username, topic_id: topic.id) expect(results.first).to eq(user1) - results = search_for("mrb", topic_id: topic2.id) + results = search_for(user1.username, topic_id: topic2.id) expect(results[1]).to eq(user2) - results = search_for("mrb", topic_id: topic3.id) + results = search_for(user1.username, topic_id: topic3.id) expect(results[1]).to eq(user5) # When searching by name is enabled, it returns the record @@ -106,7 +106,7 @@ describe UserSearch do expect(results.size).to eq(0) # find an exact match first - results = search_for(user1.username) + results = search_for("mrB") expect(results.first.username).to eq(user1.username) # don't return inactive users