eliminate transaction log items table

This commit is contained in:
Albert Yi
2016-12-21 14:59:18 -08:00
parent 62956be384
commit 5a1ac41450
8 changed files with 8 additions and 132 deletions

View File

@@ -1,28 +0,0 @@
require 'test_helper'
class TransactionLogItemTest < ActiveSupport::TestCase
setup do
@user = FactoryGirl.create(:user)
end
context "Promoting a user" do
should "create a new line item in the transaction log" do
@user.level = User::Levels::GOLD
assert_difference("TransactionLogItem.count", 1) do
TransactionLogItem.record_account_upgrade(@user)
end
item = TransactionLogItem.last
assert_equal(@user.id, item.user_id)
assert_equal("account_upgrade_basic_to_gold", item.category)
end
end
context "Viewing the account upgrade page" do
should "create a new line item in the transaction log" do
assert_difference("TransactionLogItem.count", 1) do
TransactionLogItem.record_account_upgrade_view(@user, "xxx")
end
end
end
end

View File

@@ -19,12 +19,6 @@ class UserTest < ActiveSupport::TestCase
CurrentUser.user = FactoryGirl.create(:moderator_user)
end
should "create a transaction log item" do
assert_difference("TransactionLogItem.count") do
@user.promote_to!(User::Levels::GOLD)
end
end
should "create a neutral feedback" do
assert_difference("UserFeedback.count") do
@user.promote_to!(User::Levels::GOLD)