blob: 031562ea19c2f1eddeb59cbcef5ce0a3d0b4ebc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env rspec
require 'spec_helper'
describe Puppet::Transaction::Report do
describe "when using the indirector" do
after do
Puppet::Util::Cacher.expire
Puppet.settings.stubs(:use)
end
it "should be able to delegate to the :processor terminus" do
Puppet::Transaction::Report.indirection.stubs(:terminus_class).returns :processor
terminus = Puppet::Transaction::Report.indirection.terminus(:processor)
Facter.stubs(:value).returns "host.domain.com"
report = Puppet::Transaction::Report.new("apply")
terminus.expects(:process).with(report)
Puppet::Transaction::Report.indirection.save(report)
end
end
end
|