summaryrefslogtreecommitdiff
path: root/spec/functions/ensure_packages_spec.rb
diff options
context:
space:
mode:
authorHailee Kenney <hailee@puppet.com>2017-03-03 16:40:32 +0000
committerGitHub <noreply@github.com>2017-03-03 16:40:32 +0000
commit01b951b4966c1fe150a160fdc8f4196b6e21ee51 (patch)
tree1643609784f5b46f3ef7ff1ca1c16e08b8c24d5f /spec/functions/ensure_packages_spec.rb
parent9e28f8f80ab512efff5eba4fecbaadb4220ca01c (diff)
parent2f463600c2c0b6ac95ec71d3e5b17d1b2abdcd22 (diff)
Merge pull request #732 from pmcmaw/FM-6063-unitTests
(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