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

describe 'str2saltedsha512 function' do
  describe 'success' do
    pp = <<-DOC
      $o = str2saltedsha512('password')
      notice(inline_template('str2saltedsha512 is <%= @o.inspect %>'))
    DOC
    it 'works with "y"' do
      apply_manifest(pp, :catch_failures => true) do |r|
        expect(r.stdout).to match(%r{str2saltedsha512 is "[a-f0-9]{136}"})
      end
    end
  end
  describe 'failure' do
    it 'handles no arguments'
    it 'handles more than one argument'
    it 'handles non strings'
  end
end