diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-22 14:40:07 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-22 14:42:03 -0700 |
commit | 63fc9a59b870b1890ed658056d04619467c66710 (patch) | |
tree | f51ed8ab6b617c482ab1d123dcc00028b3020d5f /spec | |
parent | 38b20d0c5bebe3a57d2823d65d717a008c36e1e1 (diff) | |
download | chef-63fc9a59b870b1890ed658056d04619467c66710.tar.gz |
Handle reboots in Chef and provide finer grained control of behavior
Rename the property to reboot to align with Chef naming. Allow delayed, immediate, or never for reboot actions. Using the actions from reboot was pretty confusing so I used notification names which seems to lineup nicely.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/windows_adjoin.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/resource/windows_adjoin.rb b/spec/unit/resource/windows_adjoin.rb index 4ce20d5202..bbaec7eaa6 100644 --- a/spec/unit/resource/windows_adjoin.rb +++ b/spec/unit/resource/windows_adjoin.rb @@ -31,4 +31,11 @@ describe Chef::Resource::WindowsAdJoin do it "sets the default action as :join" do expect(resource.action).to eql([:join]) end + + it "accepts :immediate, :delayed, or :never values for 'reboot' property" do + expect { resource.reboot :immediate }.not_to raise_error + expect { resource.reboot :delayed }.not_to raise_error + expect { resource.reboot :never }.not_to raise_error + expect { resource.reboot :nopenope }.to raise_error(ArgumentError) + end end |