Skip to content

Commit

Permalink
Merge pull request #1187 from sul-dlss/remove-jp2
Browse files Browse the repository at this point in the history
Additional corrections of tested url
  • Loading branch information
justinlittman authored Jun 28, 2024
2 parents 4922bdd + cd5edad commit f981b9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/requests/iiif_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@
end

it 'redirects requests to the degraded info.json' do
get '/image/iiif/nr349ct7889/image.jp2/info.json'
get '/image/iiif/nr349ct7889/image/info.json'
expect(response).to have_http_status :redirect
expect(response).to redirect_to('/image/iiif/degraded/nr349ct7889/image.jp2/info.json')
expect(response).to redirect_to('/image/iiif/degraded/nr349ct7889/image/info.json')
expect(response.headers['Cache-Control']).to match(/max-age=0/)
end

context 'when connecting to the degraded url' do
it 'serves a degraded info.json description for the original file' do
get '/image/iiif/degraded/nr349ct7889/image.jp2/info.json'
get '/image/iiif/degraded/nr349ct7889/image/info.json'

expect(response).to have_http_status :ok
expect(controller.send(:current_image).id).to eq 'nr349ct7889'
Expand Down Expand Up @@ -257,9 +257,9 @@
end

it 'redirects to degraded version' do
get '/image/iiif/nr349ct7889/image.jp2/info.json'
get '/image/iiif/nr349ct7889/image/info.json'
expect(response).to have_http_status :redirect
expect(response).to redirect_to('/image/iiif/degraded/nr349ct7889/image.jp2/info.json')
expect(response).to redirect_to('/image/iiif/degraded/nr349ct7889/image/info.json')
end
end
end
Expand Down

0 comments on commit f981b9d

Please sign in to comment.