Skip to content

Commit d8fb6bc

Browse files
committed
Rack::Test update: Rename response header -> headers
1 parent 978ef20 commit d8fb6bc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spec/unit/controllers/internal/download_droplets_controller_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def upload_droplet
6464
get "/internal/v2/droplets/#{process.guid}/#{process.droplet_checksum}/download"
6565

6666
expect(last_response).to be_redirect
67-
expect(last_response.header['Location']).to eq(expected_redirect)
67+
expect(last_response.headers['Location']).to eq(expected_redirect)
6868
end
6969
end
7070

@@ -250,7 +250,7 @@ def upload_droplet(target_droplet=droplet)
250250
get "/internal/v4/droplets/#{process.guid}/#{process.droplet_checksum}/download"
251251

252252
expect(last_response).to be_redirect
253-
expect(last_response.header['Location']).to eq('http://example.com/somewhere/else')
253+
expect(last_response.headers['Location']).to eq('http://example.com/somewhere/else')
254254
end
255255

256256
context 'when using with a revision' do
@@ -271,7 +271,7 @@ def upload_droplet(target_droplet=droplet)
271271
get "/internal/v4/droplets/#{process.guid}/#{new_droplet.checksum}/download"
272272

273273
expect(last_response).to be_redirect
274-
expect(last_response.header['Location']).to eq('http://example.com/correct/droplet')
274+
expect(last_response.headers['Location']).to eq('http://example.com/correct/droplet')
275275
end
276276
end
277277
end

spec/unit/controllers/runtime/apps_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ def delete_app
18181818
it 'lets the user download the droplet' do
18191819
get "/v2/apps/#{process.app.guid}/droplet/download", Oj.dump({})
18201820
expect(last_response).to be_redirect
1821-
expect(last_response.header['Location']).to eq('http://example.com/somewhere/else')
1821+
expect(last_response.headers['Location']).to eq('http://example.com/somewhere/else')
18221822
end
18231823

18241824
it 'returns an error for non-existent apps' do

spec/unit/controllers/runtime/buildpack_bits_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ module VCAP::CloudController
316316
authorize(staging_user, staging_password)
317317
get "/v2/buildpacks/#{test_buildpack.guid}/download"
318318
expect(last_response.status).to eq(302)
319-
expect(last_response.header['Location']).to match(/cc-buildpacks/)
319+
expect(last_response.headers['Location']).to match(/cc-buildpacks/)
320320
end
321321

322322
it 'returns 404 for missing bits' do

0 commit comments

Comments
 (0)