]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb
upgrade to stdlib 4.6.1
[dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / str2saltedsha512_spec.rb
1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
3
4 describe 'str2saltedsha512 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5   describe 'success' do
6     it 'works with "y"' do
7       pp = <<-EOS
8       $o = str2saltedsha512('password')
9       notice(inline_template('str2saltedsha512 is <%= @o.inspect %>'))
10       EOS
11
12       apply_manifest(pp, :catch_failures => true) do |r|
13         expect(r.stdout).to match(/str2saltedsha512 is "[a-f0-9]{136}"/)
14       end
15     end
16   end
17   describe 'failure' do
18     it 'handles no arguments'
19     it 'handles more than one argument'
20     it 'handles non strings'
21   end
22 end