summaryrefslogtreecommitdiff
path: root/spec/functions/ensure_packages_spec.rb
diff options
context:
space:
mode:
authorPaula McMaw <paula@puppet.com>2017-03-03 15:25:53 +0000
committerPaula McMaw <paula@puppet.com>2017-03-03 15:33:37 +0000
commit2f463600c2c0b6ac95ec71d3e5b17d1b2abdcd22 (patch)
tree68ec310d43b889a5bb5ea7c9a551d4dd299ef1d0 /spec/functions/ensure_packages_spec.rb
parent2fa8b2b6387aa59d8cc10e521e069e02477a186b (diff)
(FM-6063) - Unit tests for high effort functions
Diffstat (limited to 'spec/functions/ensure_packages_spec.rb')
-rwxr-xr-xspec/functions/ensure_packages_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/functions/ensure_packages_spec.rb b/spec/functions/ensure_packages_spec.rb
index 5d97684..6f94d72 100755
--- a/spec/functions/ensure_packages_spec.rb
+++ b/spec/functions/ensure_packages_spec.rb
@@ -36,9 +36,16 @@ describe 'ensure_packages' do
context 'given hash of packages' do
before { subject.call([{"foo" => { "provider" => "rpm" }, "bar" => { "provider" => "gem" }}, { "ensure" => "present"}]) }
+ before { subject.call([{"パッケージ" => { "ensure" => "absent"}}]) }
+ before { subject.call([{"ρǻ¢κầģẻ" => { "ensure" => "absent"}}]) }
# this lambda is required due to strangeness within rspec-puppet's expectation handling
it { expect(lambda { catalogue }).to contain_package('foo').with({'provider' => 'rpm', 'ensure' => 'present'}) }
it { expect(lambda { catalogue }).to contain_package('bar').with({'provider' => 'gem', 'ensure' => 'present'}) }
+
+ context 'should run with UTF8 and double byte characters' do
+ it { expect(lambda { catalogue }).to contain_package('パッケージ').with({'ensure' => 'absent'}) }
+ it { expect(lambda { catalogue }).to contain_package('ρǻ¢κầģẻ').with({'ensure' => 'absent'}) }
+ end
end
end