summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/collector.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/unit/parser/collector.rb b/spec/unit/parser/collector.rb
index c2d5a991b..926033c68 100755
--- a/spec/unit/parser/collector.rb
+++ b/spec/unit/parser/collector.rb
@@ -505,7 +505,17 @@ describe Puppet::Parser::Collector, "when building its ActiveRecord query for co
@collector.evaluate.should == [@resource]
end
- it "should return parameter names, parameter values and tags when querying ActiveRecord" do
+ it "should return parameter names, parameter values when querying ActiveRecord" do
+ Puppet::Rails::Resource.stubs(:find).with { |*arguments|
+ options = arguments[3]
+ options[:include] == {:param_values => :param_name}
+ }.returns([@resource])
+
+ @collector.evaluate.should == [@resource]
+ end
+
+ it "should return tags when querying ActiveRecord with a tag exported query" do
+ @collector.equery = "puppet_tags.name = test"
Puppet::Rails::Resource.stubs(:find).with { |*arguments|
options = arguments[3]
options[:include] == {:param_values => :param_name, :puppet_tags => :resource_tags}