diff options
author | Grant Ridder <shortdudey123@gmail.com> | 2016-11-30 11:29:52 -0800 |
---|---|---|
committer | Grant Ridder <shortdudey123@gmail.com> | 2016-11-30 11:37:29 -0800 |
commit | 937faa7e42c6df03b1deec0e8bbc785b7ba33e90 (patch) | |
tree | 9d1fef4c8b8587c831101807b30ec989e869f7df /spec/unit/provider | |
parent | 0a2e27001c3c678f2a0a7d354a14a4e36c6555e9 (diff) | |
download | chef-937faa7e42c6df03b1deec0e8bbc785b7ba33e90.tar.gz |
Alias unmount to umount for mount resource
Allows the usage of `action :unmount` to `umount` a mount point
Closes https://github.com/chef/chef/issues/5595
Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
Diffstat (limited to 'spec/unit/provider')
-rw-r--r-- | spec/unit/provider/mount_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/provider/mount_spec.rb b/spec/unit/provider/mount_spec.rb index 19967e8496..b2497cf1b2 100644 --- a/spec/unit/provider/mount_spec.rb +++ b/spec/unit/provider/mount_spec.rb @@ -70,6 +70,13 @@ describe Chef::Provider::Mount do expect(new_resource).to be_updated_by_last_action end + it "should unmount the filesystem if it is mounted" do + allow(current_resource).to receive(:mounted).and_return(true) + expect(provider).to receive(:umount_fs).and_return(true) + provider.run_action(:unmount) + expect(new_resource).to be_updated_by_last_action + end + it "should not umount the filesystem if it is not mounted" do allow(current_resource).to receive(:mounted).and_return(false) expect(provider).not_to receive(:umount_fs) |