Commit 7f570348 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'master' into fl-eslint-vue-house-keeping

* master:
  Don't use Rails.root.join for upload fixture paths
  Fix translation placeholder for Gitaly address
  Revert extra CSS causing Gitaly Servers table to be misalgined
  Fix conversion of integer into string in board spec
parents a9a15124 87eb2b6e
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
- if @gitaly_servers.any? - if @gitaly_servers.any?
.table-holder .table-holder
%table.table.responsive-table %table.table.responsive-table
%thead.d-none.d-sm-none.d-md-block %thead
%tr %tr
%th= _("Storage") %th= _("Storage")
%th= n_("Gitaly|Address") %th= s_("Gitaly|Address")
%th= _("Server version") %th= _("Server version")
%th= _("Git version") %th= _("Git version")
%th= _("Up to date") %th= _("Up to date")
......
...@@ -2249,6 +2249,9 @@ msgstr "" ...@@ -2249,6 +2249,9 @@ msgstr ""
msgid "Gitaly" msgid "Gitaly"
msgstr "" msgstr ""
msgid "Gitaly|Address"
msgstr ""
msgid "Gitaly Servers" msgid "Gitaly Servers"
msgstr "" msgstr ""
......
...@@ -156,12 +156,18 @@ describe Boards::ListsController do ...@@ -156,12 +156,18 @@ describe Boards::ListsController do
def move(user:, board:, list:, position:) def move(user:, board:, list:, position:)
sign_in(user) sign_in(user)
patch :update, namespace_id: project.namespace.to_param, params = { namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
board_id: board.to_param, board_id: board.to_param,
id: list.to_param, id: list.to_param,
list: { position: position }, list: { position: position },
format: :json format: :json }
if Gitlab.rails5?
patch :update, params: params, as: :json
else
patch :update, params
end
end end
end end
......
...@@ -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