aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 81d3ff2e5..4e14aeaa3 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -10,7 +10,7 @@ describe UserController, "when showing a user" do
integrate_views
fixtures :users, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things
before(:each) do
- load_raw_emails_data(raw_emails)
+ load_raw_emails_data
rebuild_xapian_index
end
@@ -46,10 +46,14 @@ describe UserController, "when showing a user" do
it "should search the user's contributions" do
get :show, :url_name => "bob_smith"
- assigns[:xapian_requests].results.map{|x|x[:model].info_request}.should =~ InfoRequest.all(:conditions => "user_id = #{users(:bob_smith_user).id}")
+ assigns[:xapian_requests].results.map{|x|x[:model].info_request}.should =~ InfoRequest.all(
+ :conditions => "user_id = #{users(:bob_smith_user).id}")
get :show, :url_name => "bob_smith", :user_query => "money"
- assigns[:xapian_requests].results.map{|x|x[:model].info_request}.should == [info_requests(:naughty_chicken_request)]
+ assigns[:xapian_requests].results.map{|x|x[:model].info_request}.should =~ [
+ info_requests(:naughty_chicken_request),
+ info_requests(:another_boring_request),
+ ]
end
it "should not show unconfirmed users" do