diff options
author | Mukta A <mukta.aphale@clogeny.com> | 2013-06-10 13:54:04 +0530 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-06-11 09:37:52 -0700 |
commit | cf544bddcb960c77cf7a8fd0cfd3811e89ab14a0 (patch) | |
tree | d81134807b5503c6b925ad23d09fe6e553327c8c /spec/unit/resource/mount_spec.rb | |
parent | 8ff116e564402e7521414a5cad34e21cf7ef022f (diff) | |
download | chef-cf544bddcb960c77cf7a8fd0cfd3811e89ab14a0.tar.gz |
Added tests for mount - to support username, password and domain
Diffstat (limited to 'spec/unit/resource/mount_spec.rb')
-rw-r--r-- | spec/unit/resource/mount_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/unit/resource/mount_spec.rb b/spec/unit/resource/mount_spec.rb index 498f33a7ba..9f9a534a4e 100644 --- a/spec/unit/resource/mount_spec.rb +++ b/spec/unit/resource/mount_spec.rb @@ -136,6 +136,21 @@ describe Chef::Resource::Mount do @resource.supports.should == support_hash end + it "should allow you to set username" do + @resource.username("Administrator") + @resource.username.should == "Administrator" + end + + it "should allow you to set password" do + @resource.password("Jetstream123!") + @resource.password.should == "Jetstream123!" + end + + it "should allow you to set domain" do + @resource.domain("TEST_DOMAIN") + @resource.domain.should == "TEST_DOMAIN" + end + describe "when it has mount point, device type, and fstype" do before do @resource.device("charmander") @@ -155,4 +170,26 @@ describe Chef::Resource::Mount do @resource.identity.should == "charmander" end end + + describe "when it has username, password and domain" do + before do + @resource.mount_point("T:") + @resource.device("charmander") + @resource.username("Administrator") + @resource.password("Jetstream123!") + @resource.domain("TEST_DOMAIN") + end + + it "describes its state" do + state = @resource.state + puts state + state[:mount_point].should == "T:" + state[:username].should == "Administrator" + state[:password].should == "Jetstream123!" + state[:domain].should == "TEST_DOMAIN" + state[:device_type].should eql(:device) + state[:fstype].should == "auto" + end + + end end |