diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-16 12:00:48 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-30 13:50:38 +0100 |
commit | 302769c8d848ed958ef214f726f8b0bd9ab359d1 (patch) | |
tree | 53578ec408efad69d51b4c5452c0e700efa9c49a /spec/controllers/user_controller_spec.rb | |
parent | 4cdff2bfd5e129371079253107cf07fc34c5884e (diff) |
Test for the user's wall.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 0d7b19e1e..ab485cb14 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -630,6 +630,26 @@ describe UserController, "when showing JSON version for API" do end +describe UserController, "when viewing the wall" do + integrate_views + + before(:each) do + rebuild_xapian_index + end + + it "should show users stuff on their wall, most recent first" do + user = users(:silly_name_user) + ire = info_request_events(:useless_incoming_message_event) + ire.created_at = DateTime.new(2001,1,1) + session[:user_id] = user.id + get :wall, :url_name => user.url_name + assigns[:feed_results][0].should_not == ire + ire.created_at = Time.now + ire.save! + get :wall, :url_name => user.url_name + assigns[:feed_results][0].should == ire + end +end |