Sha256: ed60abc28cb8f90ae7a8cd637f2c85b0f7259cdb557728d908871a566d7aaae3

Contents?: true

Size: 732 Bytes

Versions: 1

Compression:

Stored size: 732 Bytes

Contents

require 'spec_helper'
describe "OmniAuth::Polaris::Adaptor" do

  describe 'initialize' do
    it 'should throw exception when must have field is not set' do
      #[:host, :port, :method, :bind_dn]
      expect{ OmniAuth::Polaris::Adaptor.new({http_uri: "http://blah.org/PAPIService/REST/public/v1/1000/100/1/patron/", method: 'GET'})}.to raise_error(ArgumentError)
    end

    it 'should throw exception when method is not supported' do
      expect { OmniAuth::Polaris::Adaptor.new({http_uri: "http://blah.org/PAPIService/REST/public/v1/1000/100/1/patron/", method: 'POST', access_key: 'F9998888-A000-1111-C22C-CC3333BB4444', access_id: 'API'})}.to raise_error(OmniAuth::Polaris::Adaptor::ConfigurationError)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-polaris-1.0.5 spec/omniauth-ldap/adaptor_spec.rb