summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/stdlib/spec/acceptance/base64_spec.rb
blob: 5cc4d62c6e1996bb0784a0da405ea30c54921421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper_acceptance'

describe 'base64 function' do
  describe 'success' do
    pp = <<-DOC
      $encodestring = base64('encode', 'thestring')
      $decodestring = base64('decode', $encodestring)
      notify { $decodestring: }
    DOC
    it 'encodes then decode a string' do
      apply_manifest(pp, :catch_failures => true) do |r|
        expect(r.stdout).to match(%r{thestring})
      end
    end
  end
end