diff options
author | claucece <soficeli0@gmail.com> | 2015-10-05 21:57:05 -0500 |
---|---|---|
committer | claucece <soficeli0@gmail.com> | 2015-10-05 23:05:48 -0500 |
commit | 775835dc1b9a8f79cdd53d450fd6cd35f131b4a6 (patch) | |
tree | 62956df18378b83ae7a59a4bf257340be7970a7e /engines/billing/test/unit/customer_test.rb | |
parent | 2d4765030451934aaba643f7131eb6f8d6442b28 (diff) |
add test to payments and subscriptions
Diffstat (limited to 'engines/billing/test/unit/customer_test.rb')
-rw-r--r-- | engines/billing/test/unit/customer_test.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/engines/billing/test/unit/customer_test.rb b/engines/billing/test/unit/customer_test.rb deleted file mode 100644 index 6156f87..0000000 --- a/engines/billing/test/unit/customer_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'test_helper' - -class CustomerTest < ActiveSupport::TestCase - include StubRecordHelper - - setup do - @user = find_record :user - @customer = FactoryGirl.build(:customer, user: @user) - end - - test "test set of attributes should be valid" do - @customer.valid? - assert_equal Hash.new, @customer.errors.messages - end - - test "customer belongs to user" do - assert_equal User, @customer.user.class - end - - test "user validation" do - @customer.user = nil - assert !@customer.valid? - end - - test "has no payment info" do - assert !@customer.braintree_customer_id - assert !@customer.has_payment_info? - end - - test "with no braintree data" do - assert_equal @customer, @customer.with_braintree_data! - end - - test "without default credit card" do - assert_nil @customer.default_credit_card - end - -end |