diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-09-14 13:50:30 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-09-14 13:50:30 +0200 |
commit | f1e6884d6bee3b4e426863c63c8d81e940d21a20 (patch) | |
tree | 66532e59f7ebfc0512af062c97291c46872be238 /spec/controllers | |
parent | 7aa4d481db4ad5dfa65e5b28a5a83f643cea5763 (diff) | |
parent | 121c7a784718a18ad3789afcd9e546abfea09c6d (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/media_controller_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/media_controller_spec.rb b/spec/controllers/media_controller_spec.rb index 2925aed59..6651e9d84 100644 --- a/spec/controllers/media_controller_spec.rb +++ b/spec/controllers/media_controller_spec.rb @@ -8,14 +8,14 @@ describe MediaController do describe '#show' do it 'redirects to the file url when attached to a status' do status = Fabricate(:status) - media_attachment = Fabricate(:media_attachment, status: status) + media_attachment = Fabricate(:media_attachment, status: status, shortcode: 'foo') get :show, params: { id: media_attachment.to_param } expect(response).to redirect_to(media_attachment.file.url(:original)) end it 'responds with missing when there is not an attached status' do - media_attachment = Fabricate(:media_attachment, status: nil) + media_attachment = Fabricate(:media_attachment, status: nil, shortcode: 'foo') get :show, params: { id: media_attachment.to_param } expect(response).to have_http_status(404) @@ -29,7 +29,7 @@ describe MediaController do it 'raises when not permitted to view' do status = Fabricate(:status, visibility: :direct) - media_attachment = Fabricate(:media_attachment, status: status) + media_attachment = Fabricate(:media_attachment, status: status, shortcode: 'foo') get :show, params: { id: media_attachment.to_param } expect(response).to have_http_status(404) |