From afb78e2b253dfe43816e20afa2f4732eb9dc17eb Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 13 Mar 2014 18:21:38 +0000 Subject: Add some acceptance tests for functions. --- spec/acceptance/base64_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spec/acceptance/base64_spec.rb (limited to 'spec/acceptance/base64_spec.rb') diff --git a/spec/acceptance/base64_spec.rb b/spec/acceptance/base64_spec.rb new file mode 100644 index 0000000..c29b3a7 --- /dev/null +++ b/spec/acceptance/base64_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper_acceptance' + +describe 'base64 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do + it 'should encode then decode a string' do + pp = <<-EOS + $encodestring = base64('encode', 'thestring') + $decodestring = base64('decode', $encodestring) + notify { $decodestring: } + EOS + + apply_manifest(pp, :catch_failures => true) do |r| + expect(r.stdout).to match(/thestring/) + end + end +end -- cgit v1.2.3