summaryrefslogtreecommitdiffstats
path: root/test/language/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/language/resource.rb')
-rwxr-xr-xtest/language/resource.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/language/resource.rb b/test/language/resource.rb
index a464e1791..ebf47e873 100755
--- a/test/language/resource.rb
+++ b/test/language/resource.rb
@@ -395,27 +395,26 @@ class TestResource < Test::Unit::TestCase
# Now make sure we can find it again
assert_nothing_raised do
obj = Puppet::Rails::Resource.find_by_restype_and_title(
- res.type, res.title, :include => :param_names
+ res.type, res.title, :include => :params
)
end
assert_instance_of(Puppet::Rails::Resource, obj)
# Make sure we get the parameters back
- params = options[:params] || [obj.param_names.collect { |p| p.name },
+ params = options[:params] || [obj.params.collect { |p| p.name },
res.to_hash.keys].flatten.collect { |n| n.to_s }.uniq
params.each do |name|
- param = obj.param_names.find_by_name(name)
+ param = obj.params.find_by_name(name)
if res[name]
assert(param, "resource did not keep %s" % name)
else
assert(! param, "resource did not delete %s" % name)
end
if param
- values = param.param_values.collect { |pv| pv.value }
should = res[param.name]
should = [should] unless should.is_a?(Array)
- assert_equal(should, values,
+ assert_equal(should, param.value,
"%s was different" % param.name)
end
end