Sha256: 0621a5ef52ce62d088e7aaa66461a5caab990cb83cb87b9222d70f16fe0feed1

Contents?: true

Size: 666 Bytes

Versions: 9

Compression:

Stored size: 666 Bytes

Contents

# == Schema Information
#
# Table name: coupon_types
#
#  id   :integer(4)      not null, primary key
#  name :string(255)
#

require File.dirname(__FILE__) + '/../test_helper'

class CouponTypeTest < ActiveSupport::TestCase

  context 'A coupon type instance that acts_as_muck_coupon_type' do
    setup do
      @coupon_type = Factory(:coupon_type)
    end
    subject { @coupon_type }
    
    should_have_many :coupons
    
    context "types" do
      should "have default" do
        assert_equal 'Referral', CouponType.user_referral
      end
      should "have referral" do
        assert_equal 'Default', CouponType.default
      end
    end
    
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
muck-commerce-0.2.8 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.7 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.6 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.5 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.4 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.3 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.2 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.1 test/rails_root/test/unit/coupon_type_test.rb
muck-commerce-0.2.0 test/rails_root/test/unit/coupon_type_test.rb