Skip to content

Commit

Permalink
Avoid deprecated :nothing option
Browse files Browse the repository at this point in the history
Fixes #907
  • Loading branch information
atz committed Aug 17, 2016
1 parent 4019edb commit 758c1f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -71,7 +71,7 @@
context 'when a ObjectNotFoundError is raised' do
it 'returns 404 page' do
allow(controller).to receive(:show).and_raise(ActiveFedora::ObjectNotFoundError)
expect(controller).to receive(:render_404) { controller.render nothing: true }
expect(controller).to receive(:render_404) { controller.render body: nil }
get :show, params: { id: 'abc123' }
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/downloads_controller_spec.rb
Expand Up @@ -7,7 +7,7 @@
FactoryGirl.create(:file_with_work, user: user, content: File.open(fixture_file_path('files/image.png')))
end
it 'calls render_404 if the object does not exist' do
expect(controller).to receive(:render_404) { controller.render nothing: true }
expect(controller).to receive(:render_404) { controller.render body: nil }
get :show, params: { id: '8675309' }
end

Expand Down Expand Up @@ -67,14 +67,14 @@

context "that isn't persisted" do
it "returns 404 if the requested file does not exist" do
expect(controller).to receive(:render_404) { controller.render nothing: true }
expect(controller).to receive(:render_404) { controller.render body: nil }
get :show, params: { id: file_set, file: 'thumbnail' }
end
end
end

it "returns 404 if the requested association does not exist" do
expect(controller).to receive(:render_404) { controller.render nothing: true }
expect(controller).to receive(:render_404) { controller.render body: nil }
get :show, params: { id: file_set, file: 'non-existant' }
end
end
Expand Down

0 comments on commit 758c1f4

Please sign in to comment.