diff options
author | Robert Speicher <robert@gitlab.com> | 2018-06-15 19:43:48 +0300 |
---|---|---|
committer | Chris Peressini <cperessini@gitlab.com> | 2018-06-18 12:08:25 +0300 |
commit | b398fed43b2a5030dd9e0907ef0a3385340e5afe (patch) | |
tree | a6940832fcc490f41caa43c00e4173fa56069ceb /spec | |
parent | 5738eab5d450a0ea89d938612462cae82870517d (diff) |
Merge branch 'dm-remove-favicon-main-version' into 'master'
Remove FaviconUploader favicon_main version
See merge request gitlab-org/gitlab-ce!19891
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/uploads_controller_spec.rb | 17 | ||||
-rw-r--r-- | spec/lib/gitlab/favicon_spec.rb | 5 | ||||
-rw-r--r-- | spec/models/project_services/jira_service_spec.rb | 2 |
3 files changed, 6 insertions, 18 deletions
diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index 912aa82526a..444e6759694 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -580,23 +580,6 @@ describe UploadsController do expect(response).to have_gitlab_http_status(404) end end - - context 'has a valid filename on the version file' do - it 'successfully returns the file' do - get :show, model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'favicon_main_dk.png' - - expect(response).to have_gitlab_http_status(200) - expect(response.header['Content-Disposition']).to end_with 'filename="favicon_main_dk.png"' - end - end - - context 'has an invalid filename on the version file' do - it 'returns a 404' do - get :show, model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'favicon_bogusversion_dk.png' - - expect(response).to have_gitlab_http_status(404) - end - end end end end diff --git a/spec/lib/gitlab/favicon_spec.rb b/spec/lib/gitlab/favicon_spec.rb index fdc5c0180e4..ad3e7c6b5f7 100644 --- a/spec/lib/gitlab/favicon_spec.rb +++ b/spec/lib/gitlab/favicon_spec.rb @@ -18,8 +18,13 @@ RSpec.describe Gitlab::Favicon, :request_store do end it 'uses the custom favicon if a favicon appearance is present' do +<<<<<<< HEAD create :appearance, favicon: fixture_file_upload(Rails.root.join('spec/fixtures/dk.png')) expect(described_class.main).to match %r{/uploads/-/system/appearance/favicon/\d+/favicon_main_dk.png} +======= + create :appearance, favicon: fixture_file_upload('spec/fixtures/dk.png') + expect(described_class.main).to match %r{/uploads/-/system/appearance/favicon/\d+/dk.png} +>>>>>>> 26810dd771... Merge branch 'dm-remove-favicon-main-version' into 'master' end end diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb index c3b4eb17a5c..7e4fbc3ed40 100644 --- a/spec/models/project_services/jira_service_spec.rb +++ b/spec/models/project_services/jira_service_spec.rb @@ -478,7 +478,7 @@ describe JiraService do create :appearance, favicon: fixture_file_upload(Rails.root.join('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$} + expect(props[:object][:icon][:url16x16]).to match %r{^http://localhost/uploads/-/system/appearance/favicon/\d+/dk.png$} end end end |