Commit 174801d3 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Avoid potentially existing id, and fix 404 test

parent 7b208ba2
......@@ -132,7 +132,7 @@ describe Groups::EpicIssuesController do
end
context 'when user does not have permissions to delete the link' do
it 'returns status 404' do
it 'returns status 403' do
subject
expect(response.status).to eq(403)
......@@ -167,9 +167,11 @@ describe Groups::EpicIssuesController do
context 'when the epic_issue record does not exists' do
it 'returns status 404' do
delete :destroy, params: { group_id: group, epic_id: epic.to_param, id: 9999 }
group.add_developer(user)
expect(response.status).to eq(403)
delete :destroy, params: { group_id: group, epic_id: epic.to_param, id: 0 }
expect(response.status).to eq(404)
end
end
end
......
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