Sha256: c66559c186151e546c3f717d1edecd713dd3bfd785d7556eacfcebe6ca599289

Contents?: true

Size: 540 Bytes

Versions: 27

Compression:

Stored size: 540 Bytes

Contents

require 'test_helper'

class ResponseTest < Minitest::Test
  def test_initialize_success
    response = RateResponse.new(true, "success!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "<rate>Free!</rate>")
    assert response.success?
  end

  def test_initialize_failure
    assert_raises(ActiveShipping::ResponseError) do
      RateResponse.new(false, "fail!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "<rate>Free!</rate>")
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
active_shipping-1.7.3 test/unit/response_test.rb
active_shipping-1.7.2 test/unit/response_test.rb
active_shipping-1.7.1 test/unit/response_test.rb
active_shipping-1.7.0 test/unit/response_test.rb
active_shipping-1.6.5 test/unit/response_test.rb
active_shipping-1.6.4 test/unit/response_test.rb
active_shipping-1.6.3 test/unit/response_test.rb
active_shipping-1.6.2 test/unit/response_test.rb
active_shipping-1.6.1 test/unit/response_test.rb
active_shipping-1.6.0 test/unit/response_test.rb
active_shipping-1.5.0 test/unit/response_test.rb
active_shipping-1.4.3 test/unit/response_test.rb
active_shipping-1.4.2 test/unit/response_test.rb
active_shipping-1.4.1 test/unit/response_test.rb
active_shipping-1.4.0 test/unit/response_test.rb
active_shipping-1.3.0 test/unit/response_test.rb
active_shipping-1.2.2 test/unit/response_test.rb
active_shipping-1.2.1 test/unit/response_test.rb
active_shipping-1.2.0 test/unit/response_test.rb
active_shipping-1.1.3 test/unit/response_test.rb