diff options
Diffstat (limited to 'spec/unit/resource/git_spec.rb')
-rw-r--r-- | spec/unit/resource/git_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/resource/git_spec.rb b/spec/unit/resource/git_spec.rb index 1883595617..70b7e8ae8b 100644 --- a/spec/unit/resource/git_spec.rb +++ b/spec/unit/resource/git_spec.rb @@ -44,4 +44,20 @@ describe Chef::Resource::Git do expect(resource.revision).to eql("v1.0 tag") end + it "the destination property is the name_property" do + expect(resource.destination).to eql("my awesome webapp") + end + + it "sets the default action as :sync" do + expect(resource.action).to eql([:sync]) + end + + it "supports :sync, :checkout, :export, :diff, :log actions" do + expect { resource.action :sync }.not_to raise_error + expect { resource.action :checkout }.not_to raise_error + expect { resource.action :export }.not_to raise_error + expect { resource.action :diff }.not_to raise_error + expect { resource.action :log }.not_to raise_error + end + end |