Sha256: c396309505ca4f5b4d40d7e9bccd64a0788db998aa708c4c50bf0e7762cd2ed8

Contents?: true

Size: 781 Bytes

Versions: 2

Compression:

Stored size: 781 Bytes

Contents

require 'test_helper'

class GeoCertsTest < Test::Unit::TestCase
  
  context 'GeoCerts' do
    
    should 'use the sandbox host' do
      setting(GeoCerts, :sandbox, :to => true) do
        assert_equal('https://sandbox.geocerts.com', GeoCerts.host)
      end
    end
    
    should 'use the production host' do
      setting(GeoCerts, :sandbox, :to => false) do
        assert_equal('https://www.geocerts.com', GeoCerts.host)
      end
    end
    
    should 'use the given host' do
      setting(GeoCerts, :host, :to => 'test.com', :back => nil) do
        assert_equal('test.com', GeoCerts.host)
      end
      
      setting(GeoCerts, :host, :to => 'test.com:8000', :back => nil) do
        assert_equal('test.com:8000', GeoCerts.host)
      end
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geocerts-1.0.1 test/units/geo_certs_test.rb
geocerts-1.0.0 test/units/geo_certs_test.rb