diff options
author | Jack Jennings <jack@standard-library.com> | 2017-05-29 09:22:22 -0700 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-29 18:22:22 +0200 |
commit | 3a2003ba863252f305fb32098bcd3f095b10e2ff (patch) | |
tree | 6ff5f4a1cf6c9d042baca1441409afb9ac46775d /spec/controllers | |
parent | 9a81be0d3715eb846d940794f8b34cbbe4ba67a5 (diff) |
Extract authorization policy for viewing statuses (#3150)
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/media_controller_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/controllers/media_controller_spec.rb b/spec/controllers/media_controller_spec.rb index 2541df734..5b03899e4 100644 --- a/spec/controllers/media_controller_spec.rb +++ b/spec/controllers/media_controller_spec.rb @@ -30,7 +30,7 @@ describe MediaController do it 'raises when not permitted to view' do status = Fabricate(:status) media_attachment = Fabricate(:media_attachment, status: status) - allow_any_instance_of(Status).to receive(:permitted?).and_return(false) + allow_any_instance_of(MediaController).to receive(:authorize).and_raise(ActiveRecord::RecordNotFound) get :show, params: { id: media_attachment.to_param } expect(response).to have_http_status(:missing) |