diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-11-30 12:06:52 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-11-30 14:39:39 -0800 |
| commit | 0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af (patch) | |
| tree | 2d7273c61a3aa21d4e475f63952450a0376a6b86 /spec/unit/ssl | |
| parent | f77764de3ace7cc880a77466618a5affe1b61a8e (diff) | |
| download | puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.gz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.xz puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.zip | |
Maint: Modified uses of indirector.save to call the indirection directly.
This change replaces calls to <model object>.save with calls to <model
class>.indirection.save(<model object>). This makes the use of the
indirector explicit rather than implicit so that it will be easier to
search for all indirector call sites using grep. This is an
intermediate refactor on the way towards allowing indirector calls to
be explicitly routed to multiple termini.
This patch affects production code.
Diffstat (limited to 'spec/unit/ssl')
| -rwxr-xr-x | spec/unit/ssl/certificate_authority_spec.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/ssl/host_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/ssl/certificate_authority_spec.rb b/spec/unit/ssl/certificate_authority_spec.rb index a350c0fe3..7198e33ad 100755 --- a/spec/unit/ssl/certificate_authority_spec.rb +++ b/spec/unit/ssl/certificate_authority_spec.rb @@ -149,7 +149,7 @@ describe Puppet::SSL::CertificateAuthority do Puppet::SSL::CertificateRevocationList.expects(:new).returns crl crl.expects(:generate).with(@ca.host.certificate.content, @ca.host.key.content) - Puppet::SSL::CertificateRevocationList.indirection.expects(:save).with(crl, nil) + Puppet::SSL::CertificateRevocationList.indirection.expects(:save).with(crl) @ca.crl.should equal(crl) end @@ -330,7 +330,7 @@ describe Puppet::SSL::CertificateAuthority do end it "should save the resulting certificate" do - Puppet::SSL::Certificate.indirection.expects(:save).with(@cert, nil) + Puppet::SSL::Certificate.indirection.expects(:save).with(@cert) @ca.sign(@name, :ca, @request) end diff --git a/spec/unit/ssl/host_spec.rb b/spec/unit/ssl/host_spec.rb index 05239431c..77911091e 100755 --- a/spec/unit/ssl/host_spec.rb +++ b/spec/unit/ssl/host_spec.rb @@ -380,7 +380,7 @@ describe Puppet::SSL::Host do key = stub 'key', :public_key => mock("public_key"), :content => "mycontent" @host.stubs(:key).returns(key) @request.expects(:generate).with("mycontent") - Puppet::SSL::CertificateRequest.indirection.expects(:save).with(@request, nil) + Puppet::SSL::CertificateRequest.indirection.expects(:save).with(@request) @host.generate_certificate_request.should be_true @host.certificate_request.should equal(@request) |
