Sha256: eec76e6b97d7ba28711ebff2ac2b8c10aa339e898636eedc494c0ec4112212f8

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

require 'test_helper'

class GeoCerts::Order::RenewalInformationTest < Test::Unit::TestCase
  
  context 'GeoCerts::Order::RenewalInformation' do
    
    [ :months,
      :serial_number,
      :order_id,
      :expires_at ].each do |method|
        
        should "respond to #{method}" do
          assert_respond_to(GeoCerts::Order::RenewalInformation.new, method)
        end

        should "properly set the #{method}" do
          assert_equal('test', GeoCerts::Order::RenewalInformation.new(method => 'test').__send__(method))
        end
        
    end
    
    should 'respond to indicator' do
      assert_respond_to(GeoCerts::Order::RenewalInformation.new, :indicator)
    end
    
    should 'set the indicator to true' do
      assert_kind_of TrueClass, GeoCerts::Order::RenewalInformation.new(:indicator => 'true').indicator
    end
    
    should 'set the indicator to false' do
      assert_kind_of FalseClass, GeoCerts::Order::RenewalInformation.new(:indicator => 'false').indicator
    end
    
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geocerts-0.0.16 test/units/order/renewal_information_test.rb
geocerts-0.0.15 test/units/order/renewal_information_test.rb
geocerts-0.0.14 test/units/order/renewal_information_test.rb
geocerts-0.0.13 test/units/order/renewal_information_test.rb
geocerts-0.0.12 test/units/order/renewal_information_test.rb
geocerts-0.0.11 test/units/order/renewal_information_test.rb