Address review comments from @nilsding

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
Karina Kwiatek 2022-01-01 22:10:13 +01:00
parent 5a597fca5c
commit 9ce1fc0ce4
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ class ServicesController < ApplicationController
flash[:success] = t('flash.service.create.success')
else
if service.errors.details.has_key?(:uid) && service.errors.details[:uid].any? { |err| err[:error] == :taken }
flash[:error] = "The #{service.type.split('::').last.titleize} account you are trying to connect is already connected to another #{APP_CONFIG['site_name']} account."
flash[:error] = "The #{service.type.split('::').last.titleize} account you are trying to connect is already connected to another #{APP_CONFIG['site_name']} account. If you are unable to disconnect the account yourself, please send us a Direct Message on Twitter: @retrospring."
else
flash[:error] = t('flash.service.create.error')
end

View File

@ -34,7 +34,7 @@ describe ServicesController, type: :controller do
it 'shows an error when trying to attach a service account which is already connected' do
subject
expect(flash[:error]).to eq("The Twitter account you are trying to connect is already connected to another #{APP_CONFIG['site_name']} account.")
expect(flash[:error]).to eq("The Twitter account you are trying to connect is already connected to another #{APP_CONFIG['site_name']} account. If you are unable to disconnect the account yourself, please send us a Direct Message on Twitter: @retrospring.")
end
end
end