resolve merge in notifications controller
This commit is contained in:
commit
36f9ca6b1a
1 changed files with 10 additions and 2 deletions
|
|
@ -57,6 +57,11 @@ describe NotificationsController do
|
||||||
get :read_all, :format => :html
|
get :read_all, :format => :html
|
||||||
response.should redirect_to(stream_path)
|
response.should redirect_to(stream_path)
|
||||||
end
|
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
|
it "should return a dummy value in the json version" do
|
||||||
Factory(:notification, :recipient => alice)
|
Factory(:notification, :recipient => alice)
|
||||||
get :read_all, :format => :json
|
get :read_all, :format => :json
|
||||||
|
|
@ -76,6 +81,11 @@ describe NotificationsController do
|
||||||
response.body.should =~ /note_html/
|
response.body.should =~ /note_html/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'succeeds on mobile' do
|
||||||
|
get :index, :format => :mobile
|
||||||
|
response.should be_success
|
||||||
|
end
|
||||||
|
|
||||||
it 'paginates the notifications' do
|
it 'paginates the notifications' do
|
||||||
25.times { Factory(:notification, :recipient => alice, :target => @post) }
|
25.times { Factory(:notification, :recipient => alice, :target => @post) }
|
||||||
get :index
|
get :index
|
||||||
|
|
@ -104,8 +114,6 @@ describe NotificationsController do
|
||||||
|
|
||||||
Nokogiri(response.body).css('.aspect_membership').should_not be_empty
|
Nokogiri(response.body).css('.aspect_membership').should_not be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue