diff options
author | Scott Hain <shain@getchef.com> | 2014-07-01 13:28:24 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-04 15:52:23 -0700 |
commit | bb99bc9d6b5318267ddd02dd51c19b484636fbde (patch) | |
tree | a71fdffbfa3db5e1b875f2ce6eac3513609d9b97 /spec/unit/search | |
parent | 1b16bce71b99e3573bac78562331af91ec381f7f (diff) | |
download | chef-bb99bc9d6b5318267ddd02dd51c19b484636fbde.tar.gz |
Refactored thanks to some great input
Diffstat (limited to 'spec/unit/search')
-rw-r--r-- | spec/unit/search/query_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/search/query_spec.rb b/spec/unit/search/query_spec.rb index 8ab653b6f7..e05c52a6a4 100644 --- a/spec/unit/search/query_spec.rb +++ b/spec/unit/search/query_spec.rb @@ -125,6 +125,10 @@ describe Chef::Search::Query do @query.search(:node, "platform:rhel", "id desc", 2, 40) end + it "should throw an exception if you pass to many options" do + lambda { @query.search(:node, "platform:rhel", "id desc", 2, 40, "wrong") }.should raise_error(ArgumentError) + end + it "should return the raw rows, start, and total if no block is passed" do rows, start, total = @query.search(:node) rows.should equal(@response["rows"]) |