summaryrefslogtreecommitdiff
path: root/spec/unit/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 5cf6c86..0e16e60 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -185,11 +185,20 @@ describe provider_class do
describe "when setting the revision property" do
it "should use 'git fetch' and 'git reset'" do
@resource.expects(:value).with(:path).returns(@path).at_least_once
- @provider.expects('git').with('fetch', 'origin')
+ @provider.expects('git').with('pull', 'origin')
Dir.expects(:chdir).with(@path).at_least_once.yields
@provider.expects('git').with('reset', '--hard', 'carcar')
@provider.revision = 'carcar'
end
end
+ describe "when updating references" do
+ it "should use 'git fetch --tags'" do
+ @resource.expects(:value).with(:path).returns(@path).at_least_once
+ @provider.expects('git').with('fetch', '--tags', 'origin')
+ Dir.expects(:chdir).with(@path).at_least_once.yields
+ @provider.update_references
+ end
+ end
+
end