Sha256: e50eddeffcc0c18cff8054f5ac4aad82e6d81b07e66b4cf652fb59e57e4db36a

Contents?: true

Size: 649 Bytes

Versions: 14

Compression:

Stored size: 649 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 current subscription' do
    assert_equal 1, @shop.subscriptions.active.size
    assert @shop.current_subscription?
    assert_equal disco_app_subscriptions(:current_widget_store_subscription), @shop.current_subscription
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
disco_app-0.8.8 test/models/disco_app/shop_test.rb
disco_app-0.8.9 test/models/disco_app/shop_test.rb
disco_app-0.9.0 test/models/disco_app/shop_test.rb
disco_app-0.9.1 test/models/disco_app/shop_test.rb
disco_app-0.9.2 test/models/disco_app/shop_test.rb
disco_app-0.9.3 test/models/disco_app/shop_test.rb
disco_app-0.9.4 test/models/disco_app/shop_test.rb
disco_app-0.9.5 test/models/disco_app/shop_test.rb
disco_app-0.9.6 test/models/disco_app/shop_test.rb
disco_app-0.9.7 test/models/disco_app/shop_test.rb
disco_app-0.9.8 test/models/disco_app/shop_test.rb
disco_app-0.9.9 test/models/disco_app/shop_test.rb
disco_app-0.9.10 test/models/disco_app/shop_test.rb
disco_app-0.9.11 test/models/disco_app/shop_test.rb