summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Haskel <morgan@puppetlabs.com>2015-08-24 13:47:24 -0700
committerMorgan Haskel <morgan@puppetlabs.com>2015-08-24 13:47:24 -0700
commitda0e063af6c1e62f7262b591128e31ae6b12d523 (patch)
tree21ed6ec06918190e8d7016dee4e29cff4ee991d3
parent24e57b5d2849982d5a927f43d698ff7f312ab93a (diff)
parentaa23894dd3e3259f73b0e0999b8b183988696a81 (diff)
Merge pull request #510 from DavidS/base64-unit-tests
(MAINT) improve base64 unit tests
-rwxr-xr-xspec/functions/base64_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/functions/base64_spec.rb b/spec/functions/base64_spec.rb
index 42512b3..c529e9e 100755
--- a/spec/functions/base64_spec.rb
+++ b/spec/functions/base64_spec.rb
@@ -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