Sha256: 691156cc75d5ada4904313084d9d4a42e7b373a480530c308654ec77efe99e41
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' module Aws describe Credentials do it 'provides access to the access key id' do expect(Credentials.new('akid', 'secret').access_key_id).to eq('akid') end it 'provides access to the secret access key' do expect(Credentials.new('akid', 'secret').secret_access_key).to eq('secret') end it 'provides access to the session tokey' do creds = Credentials.new('akid', 'secret', 'token') expect(creds.session_token).to eq('token') end it 'defaults the session token to nil' do expect(Credentials.new('akid', 'secret').session_token).to be(nil) end describe '#set?' do it 'returns true when the key and secret are both non nil values' do expect(Credentials.new('akid', 'secret').set?).to be(true) end it 'returns false if the key is nil' do expect(Credentials.new(nil, 'secret').set?).to be(false) end it 'returns false if the secret is nil' do expect(Credentials.new('akid', nil).set?).to be(false) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems