mobile: added index and read all tests to notification spec #2997
This commit is contained in:
parent
b3868fc6dd
commit
7fd39b2896
1 changed files with 10 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue