diff options
author | Sean Walberg <sean@ertw.com> | 2015-04-09 09:54:49 -0500 |
---|---|---|
committer | Sean Walberg <sean@ertw.com> | 2015-04-09 10:02:18 -0500 |
commit | f6835a4f5af4a380d7e35e32ddd8c3a0fe7f2ac3 (patch) | |
tree | 0e4485067263b8fc2e1a8f0a00cca45918e534a1 /spec | |
parent | 4cdce72a39b6f2e9ad0eb3029d861c99494738f0 (diff) | |
download | chef-f6835a4f5af4a380d7e35e32ddd8c3a0fe7f2ac3.tar.gz |
If tags are present, add to the first-boot.json
Thanks to @coderanger from IRC for pointing me in the right direction.
I also snuck in a whitespace fix
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/knife/core/bootstrap_context_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb index 3718cb228c..268b61c756 100644 --- a/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/spec/unit/knife/core/bootstrap_context_spec.rb @@ -97,6 +97,13 @@ EXPECTED end end + describe "when tags are given" do + let(:config) { {:tags => [ "unicorn" ] } } + it "adds the attributes to first_boot" do + expect(Chef::JSONCompat.to_json(bootstrap_context.first_boot)).to eq(Chef::JSONCompat.to_json({:run_list => run_list, :tags => ["unicorn"]})) + end + end + describe "when JSON attributes are given" do let(:config) { {:first_boot_attributes => {:baz => :quux}} } it "adds the attributes to first_boot" do |