class CallbacksOnActionAndConditionTest
Public Instance Methods
test_callback_on_action_with_condition()
click to toggle source
# File activerecord/test/cases/transaction_callbacks_test.rb, line 581 def test_callback_on_action_with_condition topic = TopicWithCallbacksOnActionAndCondition.new topic.save assert_equal [:run_callback?, :create_or_update], topic.history topic.clear_history topic.approved = true topic.save assert_equal [:run_callback?, :create_or_update], topic.history topic.clear_history topic.destroy assert_equal [], topic.history end