diff options
Diffstat (limited to 'spec/unit/knife/core/windows_bootstrap_context_spec.rb')
-rw-r--r-- | spec/unit/knife/core/windows_bootstrap_context_spec.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb index 561e43eefc..639a7bf73a 100644 --- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb +++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb @@ -174,6 +174,15 @@ describe Chef::Knife::Core::WindowsBootstrapContext do EXPECTED expect(bootstrap_context.config_content).to eq expected end + + describe "when chef_license is set" do + before do + bootstrap_context.instance_variable_set(:@chef_config, Mash.new(chef_license: "accept-no-persist")) + end + it "sets chef_license in the generated config file" do + expect(bootstrap_context.config_content).to include("chef_license \"accept-no-persist\"") + end + end end describe "msi_url" do @@ -272,11 +281,4 @@ describe Chef::Knife::Core::WindowsBootstrapContext do end end - describe "#start_chef" do - it "the command includes the license acceptance environment variable" do - expect(bootstrap_context.start_chef).to match(/SET "CHEF_LICENSE=accept"\n/m) - end - - end - end |