summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-09-04 15:47:00 +1000
committerJames Turnbull <james@lovedthanlost.net>2009-09-05 09:18:25 +1000
commitd40b942d14d1da0341fb95835a28e0f7b8d88ab8 (patch)
tree86ca5ed94fd278e64d3ba11263a502828fbf081e /spec
parent4aa7fcec3d05a45c3a9d8b76fd9892ae28e7618b (diff)
downloadpuppet-d40b942d14d1da0341fb95835a28e0f7b8d88ab8.tar.gz
puppet-d40b942d14d1da0341fb95835a28e0f7b8d88ab8.tar.xz
puppet-d40b942d14d1da0341fb95835a28e0f7b8d88ab8.zip
Fixed #2589 - Renamed zfs delete to destroy and added tests
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/provider/zfs/solaris.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/unit/provider/zfs/solaris.rb b/spec/unit/provider/zfs/solaris.rb
index 8167340ce..8d1d8ccd6 100755
--- a/spec/unit/provider/zfs/solaris.rb
+++ b/spec/unit/provider/zfs/solaris.rb
@@ -12,6 +12,18 @@ describe provider_class do
@provider = provider_class.new(@resource)
end
+ it "should have a create method" do
+ @provider.should respond_to(:create)
+ end
+
+ it "should have a destroy method" do
+ @provider.should respond_to(:destroy)
+ end
+
+ it "should have an exists? method" do
+ @provider.should respond_to(:exists?)
+ end
+
describe "when calling add_properties" do
it "should add -o and the key=value for each properties with a value" do
@resource.stubs(:[]).with(:quota).returns ""
@@ -37,10 +49,10 @@ describe provider_class do
end
end
- describe "when calling delete" do
+ describe "when calling destroy" do
it "should call zfs with :destroy and this zfs" do
@provider.expects(:zfs).with(:destroy, @resource[:name])
- @provider.delete
+ @provider.destroy
end
end