Added test to avoid regression
This commit is contained in:
parent
175908e079
commit
d59648504d
1 changed files with 11 additions and 0 deletions
|
|
@ -163,4 +163,15 @@ describe PhotosController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#show" do
|
||||||
|
it 'should return 404 for nonexistent stuff on mobile devices' do
|
||||||
|
expect{get :show, :id => 772831, :format => 'mobile'}.to raise_error ActiveRecord::RecordNotFound
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should return 200 for existing stuff on mobile devices' do
|
||||||
|
get :show, :id => @alices_photo.id, :format => 'mobile'
|
||||||
|
response.should be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue