diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-29 20:24:39 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-29 20:24:39 +0000 |
commit | 59b5b15d56600ffc26d657dfea134ffcfc879725 (patch) | |
tree | 46b2fd44234965ff32725c499571b4c9d2814ec4 /spec/controllers/user_controller_spec.rb | |
parent | cb9c215d3eb3369d7f619d98c55e357247ca72d1 (diff) | |
parent | 500b4d37702cdbad113ccb94c875e90dd770231a (diff) |
Merge branch 'release/0.5' into develop
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 10 |
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 |