Sha256: 2e2073a5c984a1a518af381580fe919117752fd6999c55e4a740e446b184a361

Contents?: true

Size: 594 Bytes

Versions: 21

Compression:

Stored size: 594 Bytes

Contents

require 'test_helper'

class DiscoApp::ShopTest < ActiveSupport::TestCase

  def setup
    @shop = disco_app_shops(:widget_store)
  end

  def teardown
    @shop = nil
  end

  test 'shops can be extended via concerns' do
    assert_equal 'Australia', @shop.country.name
  end

  test 'can fetch a list of all of a shops subscriptions' do
    assert_equal 2, @shop.subscriptions.size
  end

  test 'can fetch a shops active subscription' do
    assert_equal 1, @shop.subscriptions.active.size
    assert_equal disco_app_subscriptions(:widget_store), @shop.subscriptions.active.first
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
disco_app-0.6.0 test/models/disco_app/shop_test.rb
disco_app-0.6.1 test/models/disco_app/shop_test.rb
disco_app-0.6.2 test/models/disco_app/shop_test.rb
disco_app-0.6.3 test/models/disco_app/shop_test.rb
disco_app-0.6.4 test/models/disco_app/shop_test.rb
disco_app-0.6.5 test/models/disco_app/shop_test.rb
disco_app-0.6.6 test/models/disco_app/shop_test.rb
disco_app-0.6.7 test/models/disco_app/shop_test.rb
disco_app-0.6.8 test/models/disco_app/shop_test.rb
disco_app-0.6.9 test/models/disco_app/shop_test.rb
disco_app-0.7.0 test/models/disco_app/shop_test.rb
disco_app-0.7.1 test/models/disco_app/shop_test.rb
disco_app-0.7.2 test/models/disco_app/shop_test.rb
disco_app-0.8.0 test/models/disco_app/shop_test.rb
disco_app-0.8.1 test/models/disco_app/shop_test.rb
disco_app-0.8.2 test/models/disco_app/shop_test.rb
disco_app-0.8.3 test/models/disco_app/shop_test.rb
disco_app-0.8.4 test/models/disco_app/shop_test.rb
disco_app-0.8.5 test/models/disco_app/shop_test.rb
disco_app-0.8.6 test/models/disco_app/shop_test.rb