summaryrefslogtreecommitdiff
path: root/spec/unit/provider/windows_task_spec.rb
diff options
context:
space:
mode:
authorvasu1105 <vasundhara.jagdale@msystechnologies.com>2018-05-11 15:44:55 +0530
committervasu1105 <vasundhara.jagdale@msystechnologies.com>2018-05-15 16:44:41 +0530
commite72c34556fe132919c4b8d879f5eee4ce67b3135 (patch)
treed248c53c27fbe6279efc6a95f48d81bea25bebc5 /spec/unit/provider/windows_task_spec.rb
parentc0609e449135fae43d436136a4f0fd3889a9b8f1 (diff)
downloadchef-e72c34556fe132919c4b8d879f5eee4ce67b3135.tar.gz
[MSYS-809] Fix for command resource does not handle commands with arguments
Signed-off-by: vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'spec/unit/provider/windows_task_spec.rb')
-rw-r--r--spec/unit/provider/windows_task_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/provider/windows_task_spec.rb b/spec/unit/provider/windows_task_spec.rb
index 603c9d1342..66bd6854b6 100644
--- a/spec/unit/provider/windows_task_spec.rb
+++ b/spec/unit/provider/windows_task_spec.rb
@@ -35,6 +35,15 @@ describe Chef::Provider::WindowsTask, :windows_only do
end
end
+ describe "#set_command_and_arguments" do
+ it "sets the command arguments if command has arguments passed in it" do
+ new_resource.command = "chef-client -W"
+ provider.send(:set_command_and_arguments)
+ expect(new_resource.command).to eq("chef-client")
+ expect(new_resource.command_arguments).to eq("-W")
+ end
+ end
+
describe "#set_start_day_and_time" do
it "sets the curret date and time start_day and start_time if nothing is provided by user" do
new_resource.start_day = nil