aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-29 16:35:06 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-29 16:35:06 +0000
commit9613b118b148dff0d54100d7f931189b59f3535c (patch)
treeed9334c8905aac38f96de6eca1ade8fcfa6f1a54 /spec/controllers/user_controller_spec.rb
parent5aa2bd13042110e73212f83564c35b3a1d672bbb (diff)
More test data, and fix tests
Add some more test data, and fix the tests to accommodate both this new test data and the fact that raw emails are now correctly loaded into the test environment.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 101fb716e..4e14aeaa3 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -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