We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b98192 commit 3556851Copy full SHA for 3556851
spec/puppet/resource_api/glue_spec.rb
@@ -74,6 +74,16 @@
74
end
75
76
77
+ describe '.to_hiera_hash' do
78
+ it { expect(instance.to_hiera_hash).to eq " title:\n attr: value\n attr_ro: fixed\n" }
79
+
80
+ context 'when the title contains YAML special characters' do
81
+ let(:title) { "foo:\nbar" }
82
83
+ it { expect(instance.to_hiera_hash).to eq " ? |-\n foo:\n bar\n : attr: value\n attr_ro: fixed\n" }
84
+ end
85
86
87
describe '.to_hash' do
88
it { expect(instance.to_hash).to eq(namevarname: 'title', attr: 'value', attr_ro: 'fixed') }
89
0 commit comments