v3: add active and private filter to owner query

This commit is contained in:
Konstantin Haase 2015-05-04 18:22:17 +02:00
parent 140efa4766
commit 2b12aadc0d
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
module Travis::API::V3 module Travis::API::V3
class Services::Owner::Find < Service class Services::Owner::Find < Service
params :active, :private, prefix: :repository
def result_type def result_type
@result_type ||= super @result_type ||= super
end end

View File

@ -97,9 +97,9 @@ describe Travis::API::V3::ServiceIndex do
describe "find action" do describe "find action" do
let(:action) { resource.fetch("actions").fetch("find") } let(:action) { resource.fetch("actions").fetch("find") }
specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{owner.login}{?include}") } specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{owner.login}{?active,include,private,repository.active,repository.private}") }
specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{user.login}{?include}") } specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{user.login}{?active,include,private,repository.active,repository.private}") }
specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{organization.login}{?include}") } specify { expect(action).to include("@type"=>"template", "request_method"=>"GET", "uri_template"=>"#{path}owner/{organization.login}{?active,include,private,repository.active,repository.private}") }
end end
end end