diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-29 14:50:39 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-29 14:50:39 +0300 |
commit | ddc7620babba20e55c535628e7c6a7c6046176bf (patch) | |
tree | 08548f97134c830f8195a358f28af01917881dfd /spec/requests/api/v3 | |
parent | ee189fd511e1a2c06f05e0d40e1d0b8875151391 (diff) |
[Rails5] Fix `undefined method 'downcase'` errors in requests specs
In Rails 5.0 headers are no longer inherited from Hash.
This commit fixes errors in requests specs like:
```
1) API::V3::Builds GET /projects/:id/builds/:build_id/artifacts job with artifacts when artifacts are stored locally authorized user returns specific job artifacts
Failure/Error: expect(response.headers).to include(download_headers)
NoMethodError:
undefined method `downcase' for #<Hash:0x000055e8bccc23b0>
# ./spec/requests/api/v3/builds_spec.rb:235:in `block (6 levels) in <top (required)>'
```
Diffstat (limited to 'spec/requests/api/v3')
-rw-r--r-- | spec/requests/api/v3/builds_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/v3/builds_spec.rb b/spec/requests/api/v3/builds_spec.rb index 00f067889a0..485d7c2cc43 100644 --- a/spec/requests/api/v3/builds_spec.rb +++ b/spec/requests/api/v3/builds_spec.rb @@ -232,7 +232,7 @@ describe API::V3::Builds do it 'returns specific job artifacts' do expect(response).to have_http_status(200) - expect(response.headers).to include(download_headers) + expect(response.headers.to_h).to include(download_headers) expect(response.body).to match_file(build.artifacts_file.file.file) end end @@ -332,7 +332,7 @@ describe API::V3::Builds do end it { expect(response).to have_http_status(200) } - it { expect(response.headers).to include(download_headers) } + it { expect(response.headers.to_h).to include(download_headers) } end context 'when artifacts are stored remotely' do |