Sha256: 8934b259dc6faafe3f290a0c8c3b7268feabd01db45a8ae89ef9d2ef656c6727

Contents?: true

Size: 547 Bytes

Versions: 22

Compression:

Stored size: 547 Bytes

Contents

require 'spec_helper'
require 'napa/authentication'

describe Napa::Authentication do
  context '#password_header' do
    it "returns a password hash for the request header" do
      ENV['HEADER_PASSWORD'] = 'foo'
      Napa::Authentication.password_header.class.should eq(Hash)
      Napa::Authentication.password_header.should eq('Password' => 'foo')
    end

    it 'raises when the HEADER_PASSWORD env var is not defined' do
      ENV['HEADER_PASSWORD'] = nil
      expect{Napa::Authentication.password_header}.to raise_error
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
napa-0.3.0 spec/authentication_spec.rb
napa-0.2.1 spec/authentication_spec.rb
napa-0.2.0 spec/authentication_spec.rb
napa-0.1.29 spec/authentication_spec.rb
napa-0.1.28 spec/authentication_spec.rb
napa-0.1.26 spec/authentication_spec.rb
napa-0.1.25 spec/authentication_spec.rb
napa-0.1.24 spec/authentication_spec.rb
napa-0.1.23 spec/authentication_spec.rb
napa-0.1.22 spec/authentication_spec.rb
napa-0.1.21 spec/authentication_spec.rb
napa-0.1.20 spec/authentication_spec.rb
napa-0.1.19 spec/authentication_spec.rb
napa-0.1.18 spec/authentication_spec.rb
napa-0.1.17 spec/authentication_spec.rb
napa-0.1.16 spec/authentication_spec.rb
napa-0.1.15 spec/authentication_spec.rb
napa-0.1.14 spec/authentication_spec.rb
napa-0.1.12 spec/authentication_spec.rb
napa-0.1.13 spec/authentication_spec.rb