Sha256: 8d7a2e78ac652f0c32903733392ab50e171b571bac746d7655a02c6667d1ecea

Contents?: true

Size: 712 Bytes

Versions: 3

Compression:

Stored size: 712 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
      marketplace = 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

3 entries across 3 versions & 1 rubygems

Version Path
peddler-0.15.0 test/unit/peddler/test_marketplace.rb
peddler-0.14.0 test/unit/peddler/test_marketplace.rb
peddler-0.13.0 test/unit/peddler/test_marketplace.rb