Sha256: ca0b79e0d3917f185b1953e143c8aa26c2d0078a238a5e679e60b6888822329a

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 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('sandbox.geocerts.com', GeoCerts.host)
      end
    end
    
    should 'use the production host' do
      setting(GeoCerts, :sandbox, :to => false) do
        assert_equal('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-0.0.25 test/units/geo_certs_test.rb
geocerts-0.0.24 test/units/geo_certs_test.rb