Sha256: 6cea47579411f69506076609194c25507f6c572e32f17ec4e5af63ce22feda77

Contents?: true

Size: 698 Bytes

Versions: 18

Compression:

Stored size: 698 Bytes

Contents

require 'helper'
require 'peddler/marketplace'

class TestPeddlerMarketplace < MiniTest::Test
  def setup
    @marketplace = Peddler::Marketplace.new('ATVPDKIKX0DER')
  end

  def test_has_a_host
    assert @marketplace.host
  end

  def test_has_an_encoding
    assert @marketplace.encoding
  end

  def test_guard_against_missing_marketplace_id
    assert_raises(Peddler::Marketplace::BadId, 'missing MarketplaceId') do
      Peddler::Marketplace.new(nil)
    end
  end

  def test_guard_against_bad_marketplace_id
    assert_raises(Peddler::Marketplace::BadId, '"123" is not a valid MarketplaceId') do
      marketplace = Peddler::Marketplace.new('123')
      marketplace.host
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
peddler-1.6.2 test/unit/peddler/test_marketplace.rb
peddler-1.6.1 test/unit/peddler/test_marketplace.rb
peddler-1.6.0 test/unit/peddler/test_marketplace.rb
peddler-1.5.0 test/unit/peddler/test_marketplace.rb
peddler-1.4.1 test/unit/peddler/test_marketplace.rb
peddler-1.4.0 test/unit/peddler/test_marketplace.rb
peddler-1.3.0 test/unit/peddler/test_marketplace.rb
peddler-1.2.0 test/unit/peddler/test_marketplace.rb
peddler-1.1.1 test/unit/peddler/test_marketplace.rb
peddler-1.1.0 test/unit/peddler/test_marketplace.rb
peddler-1.0.2 test/unit/peddler/test_marketplace.rb
peddler-1.0.1 test/unit/peddler/test_marketplace.rb
peddler-1.0.0 test/unit/peddler/test_marketplace.rb
peddler-0.19.0 test/unit/peddler/test_marketplace.rb
peddler-0.18.0 test/unit/peddler/test_marketplace.rb
peddler-0.17.1 test/unit/peddler/test_marketplace.rb
peddler-0.17.0 test/unit/peddler/test_marketplace.rb
peddler-0.16.0 test/unit/peddler/test_marketplace.rb