Commit 7894813a authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch 'issue_354903' into 'master'

Rename issuables_assigned_message method

See merge request gitlab-org/gitlab!83032
parents e7206e6e 1ebdf6a3
......@@ -17,7 +17,7 @@ module IssuableLinks
# otherwise create issue links for the issues which
# are still not assigned and return success message.
if render_conflict_error?
return error(issuables_assigned_message, 409)
return error(issuables_already_assigned_message, 409)
end
if render_not_found_error?
......@@ -110,7 +110,7 @@ module IssuableLinks
{}
end
def issuables_assigned_message
def issuables_already_assigned_message
_('%{issuable}(s) already assigned' % { issuable: target_issuable_type.capitalize })
end
......
......@@ -87,12 +87,8 @@ module EpicLinks
@descendants ||= issuable.group.self_and_descendants
end
def issuables_assigned_message
'Epic(s) already assigned'
end
def issuables_not_found_message
'No Epic found for given params'
def target_issuable_type
:epic
end
end
end
......@@ -10,7 +10,7 @@ RSpec.describe EpicLinks::CreateService do
let(:user) { create(:user) }
let(:epic) { create(:epic, group: group) }
let(:epic_to_add) { create(:epic, group: group) }
let(:expected_error) { 'No Epic found for given params' }
let(:expected_error) { 'No matching epic found. Make sure that you are adding a valid epic URL.' }
let(:expected_code) { 404 }
let(:valid_reference) { epic_to_add.to_reference(full: true) }
......
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