diff options
| author | Max Martin <max@puppetlabs.com> | 2011-04-19 14:41:51 -0700 |
|---|---|---|
| committer | Max Martin <max@puppetlabs.com> | 2011-04-19 14:41:51 -0700 |
| commit | cdcff98b6ba4de967ecab0d6de9f1dd527e1f9c6 (patch) | |
| tree | 312233f4b381b59ce05f6b50426a36be94becead /spec | |
| parent | 0d1e81948fb4c5430714d63a2e3ef66b32f98fad (diff) | |
| parent | a18ac7813c7f49be9611680f80a00b1b54f625ba (diff) | |
| download | puppet-cdcff98b6ba4de967ecab0d6de9f1dd527e1f9c6.tar.gz puppet-cdcff98b6ba4de967ecab0d6de9f1dd527e1f9c6.tar.xz puppet-cdcff98b6ba4de967ecab0d6de9f1dd527e1f9c6.zip | |
Merge branch 'ticket/next/pson-ordering' into next
* ticket/next/pson-ordering:
maint: Fix PSON order dependency in test
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/node/facts_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb index 1b6991ca0..07f5f7e1b 100755 --- a/spec/unit/node/facts_spec.rb +++ b/spec/unit/node/facts_spec.rb @@ -126,7 +126,12 @@ describe Puppet::Node::Facts, "when indirecting" do Time.stubs(:now).returns(@timestamp) facts = Puppet::Node::Facts.new("foo", {'a' => 1, 'b' => 2, 'c' => 3}) facts.expiration = @expiration - facts.to_pson.should == %Q[{"data":{"name":"foo","timestamp":"#{@timestamp}","expiration":"#{@expiration}","values":{"a":1,"b":2,"c":3}},"document_type":"Puppet::Node::Facts"}] + result = PSON.parse(facts.to_pson) + result.name.should == facts.name + result.values.should == facts.values + result.timestamp.should == facts.timestamp + result.expiration.should == facts.expiration + result.type.should == Puppet::Node::Facts end it "should not include nil values" do |
