diff options
author | Claire McQuin <claire@getchef.com> | 2014-12-18 19:10:26 -0800 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-12-18 19:10:26 -0800 |
commit | f08e31446bef0270510f12243858f37eb8e06797 (patch) | |
tree | 0ffeba229d0b71a7d65666265d7aa13e879a0f86 /spec/unit/search | |
parent | 93cd9823ad4597f7a8682206c47b991ba1344352 (diff) | |
download | chef-f08e31446bef0270510f12243858f37eb8e06797.tar.gz |
Return all matches by default.
Diffstat (limited to 'spec/unit/search')
-rw-r--r-- | spec/unit/search/query_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/search/query_spec.rb b/spec/unit/search/query_spec.rb index cb4f755cb1..e426ddd25d 100644 --- a/spec/unit/search/query_spec.rb +++ b/spec/unit/search/query_spec.rb @@ -24,7 +24,7 @@ describe Chef::Search::Query do let(:query) { Chef::Search::Query.new } shared_context "filtered search" do - let(:query_string) { "search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000" } + let(:query_string) { "search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=" } let(:server_url) { "https://api.opscode.com/organizations/opscode/nodes" } let(:args) { { filter_key => filter_hash } } let(:filter_hash) { @@ -147,22 +147,22 @@ describe Chef::Search::Query do end it "queries for every object of a type by default" do - expect(rest).to receive(:get_rest).with("search/node?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000").and_return(response) + expect(rest).to receive(:get_rest).with("search/node?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=").and_return(response) query.search(:node) end it "allows a custom query" do - expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000").and_return(response) + expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=").and_return(response) query.search(:node, "platform:rhel") end it "lets you set a sort order" do - expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=id%20desc&start=0&rows=1000").and_return(response) + expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=id%20desc&start=0&rows=").and_return(response) query.search(:node, "platform:rhel", sort: "id desc") end it "lets you set a starting object" do - expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=2&rows=1000").and_return(response) + expect(rest).to receive(:get_rest).with("search/node?q=platform:rhel&sort=X_CHEF_id_CHEF_X%20asc&start=2&rows=").and_return(response) query.search(:node, "platform:rhel", start: 2) end |