Commit 75797ac3 authored by Sean McGivern's avatar Sean McGivern

Merge branch '47684-uploads-specs-are-failing-on-master' into 'master'

Resolve "Uploads specs are failing on master"

Closes #47684

See merge request gitlab-org/gitlab-ce!19638
parents 3bd5e10e 0f90c1fd
...@@ -562,7 +562,7 @@ describe UploadsController do ...@@ -562,7 +562,7 @@ describe UploadsController do
end end
context 'original filename or a version filename must match' do context 'original filename or a version filename must match' do
let!(:appearance) { create :appearance, favicon: fixture_file_upload(Rails.root.join('spec/fixtures/dk.png'), 'image/png') } let!(:appearance) { create :appearance, favicon: fixture_file_upload('spec/fixtures/dk.png', 'image/png') }
context 'has a valid filename on the original file' do context 'has a valid filename on the original file' do
it 'successfully returns the file' do it 'successfully returns the file' do
......
...@@ -18,7 +18,7 @@ RSpec.describe Gitlab::Favicon, :request_store do ...@@ -18,7 +18,7 @@ RSpec.describe Gitlab::Favicon, :request_store do
end end
it 'uses the custom favicon if a favicon appearance is present' do it 'uses the custom favicon if a favicon appearance is present' do
create :appearance, favicon: fixture_file_upload(Rails.root.join('spec/fixtures/dk.png')) create :appearance, favicon: fixture_file_upload('spec/fixtures/dk.png')
expect(described_class.main).to match %r{/uploads/-/system/appearance/favicon/\d+/favicon_main_dk.png} expect(described_class.main).to match %r{/uploads/-/system/appearance/favicon/\d+/favicon_main_dk.png}
end end
end end
......
...@@ -475,7 +475,7 @@ describe JiraService do ...@@ -475,7 +475,7 @@ describe JiraService do
end end
it 'includes returns the custom favicon' do it 'includes returns the custom favicon' do
create :appearance, favicon: fixture_file_upload(Rails.root.join('spec/fixtures/dk.png')) create :appearance, favicon: fixture_file_upload('spec/fixtures/dk.png')
props = described_class.new.send(:build_remote_link_props, url: 'http://example.com', title: 'title') props = described_class.new.send(:build_remote_link_props, url: 'http://example.com', title: 'title')
expect(props[:object][:icon][:url16x16]).to match %r{^http://localhost/uploads/-/system/appearance/favicon/\d+/favicon_main_dk.png$} expect(props[:object][:icon][:url16x16]).to match %r{^http://localhost/uploads/-/system/appearance/favicon/\d+/favicon_main_dk.png$}
......
...@@ -10,7 +10,7 @@ RSpec.describe FaviconUploader do ...@@ -10,7 +10,7 @@ RSpec.describe FaviconUploader do
end end
def upload_fixture(filename) def upload_fixture(filename)
fixture_file_upload(Rails.root.join('spec', 'fixtures', filename)) fixture_file_upload("spec/fixtures/#{filename}")
end end
context 'versions' do context 'versions' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment