diff options
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 |