提交 75797ac3 编写于 作者: S 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
......@@ -562,7 +562,7 @@ describe UploadsController do
end
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
it 'successfully returns the file' do
......
......@@ -18,7 +18,7 @@ RSpec.describe Gitlab::Favicon, :request_store do
end
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}
end
end
......
......@@ -475,7 +475,7 @@ describe JiraService do
end
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')
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
end
def upload_fixture(filename)
fixture_file_upload(Rails.root.join('spec', 'fixtures', filename))
fixture_file_upload("spec/fixtures/#{filename}")
end
context 'versions' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册