Sha256: 7905f9e137ecf29dfe40d8380e2f8127312f2f04a35c932345afc37350c85c28

Contents?: true

Size: 553 Bytes

Versions: 66

Compression:

Stored size: 553 Bytes

Contents

require 'test_helper'

class BenchmarkTest < ActiveSupport::TestCase
  include ActiveShipping::Test::Fixtures

  def setup
    @carrier = BenchmarkCarrier.new
  end

  def test_benchmark_response_is_valid
    @carrier.stubs(:generate_simulated_lag).returns(0)
    response = @carrier.find_rates(location_fixtures[:london], location_fixtures[:new_york], package_fixtures[:wii])
    assert_equal 1, response.rates.count
    rate = response.rates.first
    assert_equal "Free Benchmark Shipping", rate.service_name
    assert_equal 0, rate.price
  end
end

Version data entries

66 entries across 66 versions & 2 rubygems

Version Path
workarea-core-3.5.27 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.26 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.45 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.25 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.23 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.44 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.22 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.43 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.21 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.42 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.20 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.41 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.19 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.40 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.18 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.39 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.17 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.38 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.5.16 vendor/active_shipping/test/unit/carriers/benchmark_test.rb
workarea-core-3.4.37 vendor/active_shipping/test/unit/carriers/benchmark_test.rb