diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index bfc73ac6e..2cb13010b 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -57,6 +57,11 @@ describe NotificationsController do get :read_all, :format => :html response.should redirect_to(stream_path) end + it "should redirect to the stream in the mobile version" do + Factory(:notification, :recipient => alice) + get :read_all, :format => :mobile + response.should redirect_to(stream_path) + end it "should return a dummy value in the json version" do Factory(:notification, :recipient => alice) get :read_all, :format => :json @@ -70,6 +75,11 @@ describe NotificationsController do Factory(:notification, :recipient => alice, :target => @post) end + it 'succeeds on mobile' do + get :index, :format => :mobile + response.should be_success + end + it 'paginates the notifications' do 25.times { Factory(:notification, :recipient => alice, :target => @post) } get :index @@ -98,8 +108,6 @@ describe NotificationsController do Nokogiri(response.body).css('.aspect_membership').should_not be_empty end - - end end