Sha256: e378aed1192c7eeb702dda60ee9dba0756b503ec402da91f1f9567195d93a93e
Contents?: true
Size: 793 Bytes
Versions: 1
Compression:
Stored size: 793 Bytes
Contents
require_relative 'test_helper' class ServiceTest < MiniTest::Test def setup @klass = Class.new(Peddler::Service) @service = @klass.new('US', 'key', 'secret', 'seller_id') end def test_configures_path @klass.path('Foo') assert @service.endpoint.match(/Foo$/) end def test_has_user_agent refute @service.connection.data[:headers].empty? end def test_gets_marketplace_ids refute_equal @service.marketplace_id('US'), @service.marketplace_id('GB') end def test_inherits_parent_params assert_equal Peddler::Service.params, @klass.params end def test_inherits_parent_path @klass.path 'foo' assert_equal @klass.path, Class.new(@klass).path end def test_defines_constants_on_service refute_nil @klass.const_get(:HOSTS) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
peddler-0.5.2 | test/service_test.rb |