Commit 1383c5d2 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Add test to ensure no failure when sending empty list of refs

parent 331f1d37
......@@ -16,6 +16,16 @@ describe RelatedIssues::CreateService, service: true do
subject { described_class.new(issue, user, params).execute }
context 'when empty reference list' do
let(:params) do
{ issue_references: [] }
end
it 'returns error' do
is_expected.to eq(message: "No Issue found for given reference", status: :error, http_status: 401)
end
end
context 'when Issue not found' do
let(:params) do
{ issue_references: ['#999'] }
......
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