]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(MAINT) improve base64 unit tests
authorDavid Schmitt <david.schmitt@puppetlabs.com>
Mon, 24 Aug 2015 19:12:14 +0000 (20:12 +0100)
committerDavid Schmitt <david.schmitt@puppetlabs.com>
Mon, 24 Aug 2015 19:13:33 +0000 (20:13 +0100)
spec/functions/base64_spec.rb

index 42512b3e9779dc79ce99d6edcb1e14bb3b587272..c529e9ed857bbfb42baa23610b06faec0ba4d03d 100755 (executable)
@@ -10,6 +10,7 @@ describe 'base64' do
   it { is_expected.to run.with_params("encode", 2).and_raise_error(Puppet::ParseError, /second argument must be a string/) }
 
   it { is_expected.to run.with_params("encode", "thestring").and_return("dGhlc3RyaW5n\n") }
+  it { is_expected.to run.with_params("encode", "a very long string that will cause the base64 encoder to produce output with multiple lines").and_return("YSB2ZXJ5IGxvbmcgc3RyaW5nIHRoYXQgd2lsbCBjYXVzZSB0aGUgYmFzZTY0\nIGVuY29kZXIgdG8gcHJvZHVjZSBvdXRwdXQgd2l0aCBtdWx0aXBsZSBsaW5l\ncw==\n") }
   it { is_expected.to run.with_params("decode", "dGhlc3RyaW5n").and_return("thestring") }
   it { is_expected.to run.with_params("decode", "dGhlc3RyaW5n\n").and_return("thestring") }
 end