diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 04:45:44 +0300 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /spec/lib/gitlab/workhorse_spec.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'spec/lib/gitlab/workhorse_spec.rb')
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index da327ce7706..e9733851590 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -71,7 +71,7 @@ RSpec.describe Gitlab::Workhorse do context "when the repository doesn't have an archive file path" do before do - allow(project.repository).to receive(:archive_metadata).and_return(Hash.new) + allow(project.repository).to receive(:archive_metadata).and_return({}) end it "raises an error" do @@ -424,8 +424,9 @@ RSpec.describe Gitlab::Workhorse do describe '.send_scaled_image' do let(:location) { 'http://example.com/avatar.png' } let(:width) { '150' } + let(:content_type) { 'image/png' } - subject { described_class.send_scaled_image(location, width) } + subject { described_class.send_scaled_image(location, width, content_type) } it 'sets the header correctly' do key, command, params = decode_workhorse_header(subject) @@ -434,7 +435,8 @@ RSpec.describe Gitlab::Workhorse do expect(command).to eq("send-scaled-img") expect(params).to eq({ 'Location' => location, - 'Width' => width + 'Width' => width, + 'ContentType' => content_type }.deep_stringify_keys) end end |