summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb57
1 files changed, 0 insertions, 57 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 122eb62..116e357 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -175,28 +175,6 @@ branches
provider.expects(:git).with('checkout', '--force', resource.value(:revision))
provider.create
end
- it "should warn about destroying it using force and noop attribute" do
- resource[:force] = true
- resource[:noop] = true
- resource.delete(:revision)
- provider.expects(:working_copy_exists?).returns(true)
-
- provider.expects(:destroy).never
- provider.expects(:create).never
- Puppet::Type::Vcsrepo::Ensure.any_instance.expects(:send_log).with(:notice, "Noop Mode - Would have deleted repository and re-created from latest")
- provider.resource.retrieve
- end
- it "should warn about destroying it using force and global noop" do
- resource[:force] = true
- Puppet[:noop] = true
- resource.delete(:revision)
- provider.expects(:working_copy_exists?).returns(true)
-
- provider.expects(:destroy).never
- provider.expects(:create).never
- Puppet::Type::Vcsrepo::Ensure.any_instance.expects(:send_log).with(:notice, "Noop Mode - Would have deleted repository and re-created from latest")
- provider.resource.retrieve
- end
end
context "when the path is not empty and not a repository" do
@@ -320,41 +298,6 @@ branches
end
end
- context "checking if revision" do
- before do
- expects_chdir
- provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a))
- end
- context "is a local branch" do
- context "when it's listed in 'git branch -a'" do
- it "should return true" do
- resource[:revision] = 'feature/foo'
- expect(provider).to be_local_branch_revision
- end
- end
- context "when it's not listed in 'git branch -a'" do
- it "should return false" do
- resource[:revision] = 'feature/notexist'
- expect(provider).not_to be_local_branch_revision
- end
- end
- end
- context "is a remote branch" do
- context "when it's listed in 'git branch -a' with an 'origin/' prefix" do
- it "should return true" do
- resource[:revision] = 'only/remote'
- expect(provider).to be_remote_branch_revision
- end
- end
- context "when it's not listed in 'git branch -a' with an 'origin/' prefix" do
- it "should return false" do
- resource[:revision] = 'only/local'
- expect(provider).not_to be_remote_branch_revision
- end
- end
- end
- end
-
describe 'latest?' do
context 'when true' do
it do