summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/cvs_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb b/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
index b146d70..2e18149 100644
--- a/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
@@ -27,6 +27,15 @@ describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do
provider.create
end
+ it "should execute 'cvs checkout' as user 'muppet'" do
+ resource[:source] = ':ext:source@example.com:/foo/bar'
+ resource[:revision] = 'an-unimportant-value'
+ resource[:user] = 'muppet'
+ expects_chdir('/tmp')
+ Puppet::Util::Execution.expects(:execute).with([:cvs, '-d', resource.value(:source), 'checkout', '-r', 'an-unimportant-value', '-d', 'test', 'bar'], :uid => 'muppet', :custom_environment => {})
+ provider.create
+ end
+
it "should just execute 'cvs checkout' without a revision" do
resource[:source] = ':ext:source@example.com:/foo/bar'
resource.delete(:revision)