summaryrefslogtreecommitdiff
path: root/spec/requests/api/issues_spec.rb
diff options
context:
space:
mode:
authorjubianchi <contact@jubianchi.fr>2015-01-17 23:45:39 +0100
committerjubianchi <contact@jubianchi.fr>2015-05-02 10:44:52 +0200
commit2c544d43c832e816614a9bef35e1899f34b4a53d (patch)
tree62251a13a44a9e6aa3e370a41e418a2b0018dd78 /spec/requests/api/issues_spec.rb
parent76f7bdccc09fe1290cee330480c1a2640e3b20d5 (diff)
downloadgitlab-ce-2c544d43c832e816614a9bef35e1899f34b4a53d.tar.gz
Query issues, merge requests and milestones with their IID through API
Diffstat (limited to 'spec/requests/api/issues_spec.rb')
-rw-r--r--spec/requests/api/issues_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
index b6b0427debf..8770786f49a 100644
--- a/spec/requests/api/issues_spec.rb
+++ b/spec/requests/api/issues_spec.rb
@@ -194,6 +194,14 @@ describe API::API, api: true do
expect(json_response['iid']).to eq(issue.iid)
end
+ it 'should return a project issue by iid' do
+ get api("/projects/#{project.id}/issues?iid=#{issue.iid}", user)
+ response.status.should == 200
+ json_response.first['title'].should == issue.title
+ json_response.first['id'].should == issue.id
+ json_response.first['iid'].should == issue.iid
+ end
+
it "should return 404 if issue id not found" do
get api("/projects/#{project.id}/issues/54321", user)
expect(response.status).to eq(404)