diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-22 10:23:43 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-22 10:25:07 +0300 |
commit | cb11d3521ce99a5ce796e2fdf9e6d96a3e36791d (patch) | |
tree | 71f5ae5f9cf1f283b865d1240c5c50a7e05787ad /spec/requests/api/milestones_spec.rb | |
parent | 35d6ea4f5ee7605a7f4e4c44cc4b79a40aec9418 (diff) |
Fix IID filter for merge requests and milestones
Diffstat (limited to 'spec/requests/api/milestones_spec.rb')
-rw-r--r-- | spec/requests/api/milestones_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb index 62327f64e50..5d7b39e71b8 100644 --- a/spec/requests/api/milestones_spec.rb +++ b/spec/requests/api/milestones_spec.rb @@ -61,6 +61,15 @@ describe API::API, api: true do expect(json_response.first['id']).to eq closed_milestone.id end + it 'returns a project milestone by iid array' do + get api("/projects/#{project.id}/milestones", user), iid: [milestone.iid, closed_milestone.iid] + + expect(response).to have_http_status(200) + expect(json_response.size).to eq(2) + expect(json_response.first['title']).to eq milestone.title + expect(json_response.first['id']).to eq milestone.id + end + it 'returns 401 error if user not authenticated' do get api("/projects/#{project.id}/milestones/#{milestone.id}") |