API: ability to get project by id
This commit is contained in:
parent
92d98f5a0c
commit
1b95c8bff3
2 changed files with 9 additions and 2 deletions
|
@ -25,11 +25,17 @@ describe Gitlab::API do
|
|||
|
||||
describe "GET /projects/:id" do
|
||||
it "should return a project by id" do
|
||||
get "#{api_prefix}/projects/#{project.code}?private_token=#{user.private_token}"
|
||||
get "#{api_prefix}/projects/#{project.id}?private_token=#{user.private_token}"
|
||||
response.status.should == 200
|
||||
json_response['name'].should == project.name
|
||||
json_response['owner']['email'].should == user.email
|
||||
end
|
||||
|
||||
it "should return a project by code name" do
|
||||
get "#{api_prefix}/projects/#{project.code}?private_token=#{user.private_token}"
|
||||
response.status.should == 200
|
||||
json_response['name'].should == project.name
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /projects/:id/repository/branches" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue