diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-01 18:15:57 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-01 18:15:57 +0100 |
commit | 547394f4aa7d48b42b14a4b08c98e3c60a33db46 (patch) | |
tree | 83fc695a06d28fdbd500d5f438f0b7a2d189eb6b /spec/controllers/user_controller_spec.rb | |
parent | 19c63da981d6348f9f7b8c8f814319697be1e0c6 (diff) |
Provide a search function on the user profile pages. Closes #138.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 438fb8c0c..e373c8df6 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -32,6 +32,13 @@ describe UserController, "when showing a user" do assigns[:display_user].should == users(:bob_smith_user) end + it "should search the user's contributions" do + get :show, :url_name => "bob_smith" + assigns[:xapian_requests].results.count.should == 2 + get :show, :url_name => "bob_smith", :user_query => "money" + assigns[:xapian_requests].results.count.should == 1 + end + # Error handling not quite good enough for this yet # it "should not show unconfirmed users" do # get :show, :url_name => "silly_emnameem" |