summaryrefslogtreecommitdiffstats
path: root/spec/integration/indirector
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-11 13:53:27 -0500
committerLuke Kanies <luke@madstop.com>2008-04-11 13:53:27 -0500
commitcb617f20ed6e0af362937760f33f5ddc34e626ee (patch)
tree20fca09fe661f30765b5691273f37aed83e15249 /spec/integration/indirector
parenta6a397b21ce9306307c7614b671de63d74d8141e (diff)
downloadpuppet-cb617f20ed6e0af362937760f33f5ddc34e626ee.tar.gz
puppet-cb617f20ed6e0af362937760f33f5ddc34e626ee.tar.xz
puppet-cb617f20ed6e0af362937760f33f5ddc34e626ee.zip
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.
Diffstat (limited to 'spec/integration/indirector')
-rw-r--r--spec/integration/indirector/rest.rb20
1 files changed, 9 insertions, 11 deletions
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