Sha256: 303b05f7dc463e112578d64116bd8f87bb8e90e89a72e6acf94e8b5481cc4fc2

Contents?: true

Size: 703 Bytes

Versions: 2

Compression:

Stored size: 703 Bytes

Contents

require 'mixlib/authentication/digester'

describe Mixlib::Authentication::Digester do
  context 'backcompat' do
    # The digester API should really have been private,
    # however oc-chef-pedant uses it.
    let(:test_string) { 'hello' }
    let(:test_string_checksum) { 'qvTGHdzF6KLavt4PO0gs2a6pQ00=' }

    describe '#hash_file' do
      it 'should default to use SHA1' do
        expect(described_class.hash_file(StringIO.new(test_string))).to(
          eq(test_string_checksum))
      end
    end

    describe '#hash_string' do
      it 'should default to use SHA1' do
        expect(described_class.hash_string(test_string)).to(
          eq(test_string_checksum))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mixlib-authentication-1.4.0 spec/mixlib/authentication/digester_spec.rb
mixlib-authentication-1.4.0.rc.1 spec/mixlib/authentication/digester_spec.rb