From cb617f20ed6e0af362937760f33f5ddc34e626ee Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 11 Apr 2008 13:53:27 -0500 Subject: Making the changes necessary to get the REST support to work with the current state of the indirection work, including using a request object and an expiration date. --- spec/integration/indirector/rest.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'spec/integration/indirector') diff --git a/spec/integration/indirector/rest.rb b/spec/integration/indirector/rest.rb index a969a975b..8e3c92d5c 100644 --- a/spec/integration/indirector/rest.rb +++ b/spec/integration/indirector/rest.rb @@ -9,7 +9,6 @@ class Puppet::TestIndirectedFoo indirects :test_indirected_foo, :terminus_setting => :test_indirected_foo_terminus attr_reader :value - attr_accessor :version def initialize(value = 0) @value = value @@ -51,6 +50,7 @@ describe Puppet::Indirector::REST do end it "should not fail" do + Puppet::TestIndirectedFoo.find('bar') lambda { Puppet::TestIndirectedFoo.find('bar') }.should_not raise_error end @@ -62,8 +62,8 @@ describe Puppet::Indirector::REST do Puppet::TestIndirectedFoo.find('bar').value.should == @model_instance.value end - it 'should set a version timestamp on model instance' do - Puppet::TestIndirectedFoo.find('bar').version.should_not be_nil + it 'should set an expiration on model instance' do + Puppet::TestIndirectedFoo.find('bar').expiration.should_not be_nil end end @@ -275,8 +275,8 @@ describe Puppet::Indirector::REST do Puppet::TestIndirectedFoo.find('bar').value.should == @model_instance.value end - it 'should set a version timestamp on model instance' do - Puppet::TestIndirectedFoo.find('bar').version.should_not be_nil + it 'should set an expiration on model instance' do + Puppet::TestIndirectedFoo.find('bar').expiration.should_not be_nil end end @@ -330,11 +330,9 @@ describe Puppet::Indirector::REST do Puppet::TestIndirectedFoo.search('bar').collect(&:value).should == @model_instances.collect(&:value) end - it 'should set a version timestamp on model instances' do - pending("Luke looking at why this version magic might not be working") do - Puppet::TestIndirectedFoo.search('bar').each do |result| - result.version.should_not be_nil - end + it 'should set an expiration on model instances' do + Puppet::TestIndirectedFoo.search('bar').each do |result| + result.expiration.should_not be_nil end end end @@ -453,4 +451,4 @@ describe Puppet::Indirector::REST do @server.unlisten end end -end \ No newline at end of file +end -- cgit