From 2b12aadc0dd843e13c1166906d541554bb80fa7d Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Mon, 4 May 2015 18:22:17 +0200 Subject: [PATCH] v3: add active and private filter to owner query --- lib/travis/api/v3/services/owner/find.rb | 2 ++ spec/v3/service_index_spec.rb | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/travis/api/v3/services/owner/find.rb b/lib/travis/api/v3/services/owner/find.rb index 6751396d..09afc07c 100644 --- a/lib/travis/api/v3/services/owner/find.rb +++ b/lib/travis/api/v3/services/owner/find.rb @@ -1,5 +1,7 @@ module Travis::API::V3 class Services::Owner::Find < Service + params :active, :private, prefix: :repository + def result_type @result_type ||= super end diff --git a/spec/v3/service_index_spec.rb b/spec/v3/service_index_spec.rb index bf49e614..c932d616 100644 --- a/spec/v3/service_index_spec.rb +++ b/spec/v3/service_index_spec.rb @@ -97,9 +97,9 @@ describe Travis::API::V3::ServiceIndex do describe "find action" do 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/{user.login}{?include}") } - 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/{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}{?active,include,private,repository.active,repository.private}") } + 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