From b13af823335e6952c8494ecbdb6b2955fbd2d9eb Mon Sep 17 00:00:00 2001 From: Paula McMaw Date: Tue, 28 Feb 2017 12:03:01 +0000 Subject: (FM-6058) - Unit tests for med effort functions --- spec/functions/deep_merge_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/functions/deep_merge_spec.rb') diff --git a/spec/functions/deep_merge_spec.rb b/spec/functions/deep_merge_spec.rb index 397e048..c91a07e 100755 --- a/spec/functions/deep_merge_spec.rb +++ b/spec/functions/deep_merge_spec.rb @@ -52,4 +52,8 @@ describe 'deep_merge' do expect(argument1).to eq(original1) expect(argument2).to eq(original2) end + + context 'should run with UTF8 and double byte characters' do + it { is_expected.to run.with_params({'ĸέỹ1' => 'ϋǻļủë1'}, {'この文字列' => '万' }).and_return({'ĸέỹ1' => 'ϋǻļủë1', 'この文字列' => '万'}) } + end end -- cgit v1.2.3 From 33922a4ec7a8c204a17e0c3017eea21faa220f39 Mon Sep 17 00:00:00 2001 From: tphoney Date: Fri, 14 Jul 2017 10:14:04 +0100 Subject: FM-6239 clean up for puppet 5.tests/deprecation --- spec/functions/deep_merge_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/functions/deep_merge_spec.rb') diff --git a/spec/functions/deep_merge_spec.rb b/spec/functions/deep_merge_spec.rb index c91a07e..819e025 100755 --- a/spec/functions/deep_merge_spec.rb +++ b/spec/functions/deep_merge_spec.rb @@ -4,7 +4,7 @@ describe 'deep_merge' do it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } it { is_expected.to run.with_params({ 'key' => 'value' }).and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } it { is_expected.to run.with_params({}, '2').and_raise_error(Puppet::ParseError, /unexpected argument type String/) } - it { is_expected.to run.with_params({}, 2).and_raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) } + it { is_expected.to run.with_params({}, 2).and_raise_error(Puppet::ParseError, /unexpected argument/) } it { is_expected.to run.with_params({}, '').and_return({}) } it { is_expected.to run.with_params({}, {}).and_return({}) } it { is_expected.to run.with_params({}, {}, {}).and_return({}) } -- cgit v1.2.3