Sha256: f0a19eee4bba4272685dfe01860f36b09e3581810ad907d581c76ced536a7aab

Contents?: true

Size: 563 Bytes

Versions: 6

Compression:

Stored size: 563 Bytes

Contents

require 'spec_helper'

describe TMS::IpawsNwemAuthorization do

  it 'gets IPAWS NWEM Authorization from client' do
    client = double(:client)
    response_body = { "cogid" => "true" }
    nwem_authorization = TMS::IpawsNwemAuthorization.new(client, '/ipaws/nwem_authorization', {})
    nwem_authorization.client.should_receive('get').with(nwem_authorization.href).and_return(
      double('response', :status => 200, :body => response_body)
    )
    nwem_authorization.get.should == nwem_authorization
    nwem_authorization.cogid.should == "true"
  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
govdelivery-tms-0.8.0 spec/ipaws_nwem_authorization_spec.rb
tms_client-0.6.0 spec/ipaws_nwem_authorization_spec.rb
tms_client-0.5.4 spec/ipaws_nwem_authorization_spec.rb
tms_client-0.5.3 spec/ipaws_nwem_authorization_spec.rb
tms_client-0.5.2 spec/ipaws_nwem_authorization_spec.rb
tms_client-0.5.1 spec/ipaws_nwem_authorization_spec.rb