diff options
author | Justin Whear <justin@economicmodeling.com> | 2014-06-03 03:10:38 +0400 |
---|---|---|
committer | Hannes Rosenögger <123haynes@gmail.com> | 2015-01-22 14:08:45 +0300 |
commit | 9d271538a8e9ddff892a084e5c8a881bf2fdb0b0 (patch) | |
tree | b52b11c433b0e0191c0257094021034ecc653e0e /spec/requests | |
parent | 2b10520b306697d7cbae8f3f84ca30cacc821fa4 (diff) |
Add per-milestone issues API call
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/milestones_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb index f0619a1c801..73432cb22a7 100644 --- a/spec/requests/api/milestones_spec.rb +++ b/spec/requests/api/milestones_spec.rb @@ -96,4 +96,18 @@ describe API::API, api: true do state_event: 'close' end end + + describe "GET /projects/:id/milestones/:milestone_id/issues" do + it "should return project issues for a particular milestone" do + get api("/projects/#{project.id}/milestones/#{milestone.id}/issues", user) + response.status.should == 200 + json_response.should be_an Array + json_response.first['milestone']['title'].should == milestone.title + end + + it "should return a 401 error if user not authenticated" do + get api("/projects/#{project.id}/milestones/#{milestone.id}/issues") + response.status.should == 401 + end + end end |