Commit 375f4745 authored by Michael Kozono's avatar Michael Kozono

Move html_safe closer to its reason for being

parent 824b9305
......@@ -30,7 +30,7 @@ module EE
message = enable_hashed_storage_warning_message
render_flash_user_callout(:warning, message.html_safe, GEO_ENABLE_HASHED_STORAGE)
render_flash_user_callout(:warning, message, GEO_ENABLE_HASHED_STORAGE)
end
def render_migrate_hashed_storage_warning
......@@ -38,7 +38,7 @@ module EE
message = migrate_hashed_storage_warning_message
render_flash_user_callout(:warning, message.html_safe, GEO_MIGRATE_HASHED_STORAGE)
render_flash_user_callout(:warning, message, GEO_MIGRATE_HASHED_STORAGE)
end
def show_enable_hashed_storage_warning?
......@@ -78,7 +78,8 @@ module EE
def add_migrate_to_hashed_storage_link(message)
migrate_link = link_to(_('For more info, read the documentation.'), 'https://docs.gitlab.com/ee/administration/repository_storage_types.html#how-to-migrate-to-hashed-storage', target: '_blank')
message % { migrate_link: migrate_link }
linked_message = message % { migrate_link: migrate_link }
linked_message.html_safe
end
end
end
......@@ -123,7 +123,7 @@ describe EE::UserCalloutsHelper do
context 'when the migrate warning has not been dismissed' do
context 'when hashed storage is disabled' do
before do
expect(helper).to receive(:hashed_storage_disabled?).and_return(true)
expect(helper).to receive(:hashed_storage_enabled?).and_return(false)
end
it { is_expected.to be_falsy }
......@@ -131,7 +131,7 @@ describe EE::UserCalloutsHelper do
context 'when hashed storage is enabled' do
before do
expect(helper).to receive(:hashed_storage_disabled?).and_return(false)
expect(helper).to receive(:hashed_storage_enabled?).and_return(true)
end
context 'when there is a project in non-hashed-storage' 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