File: machine_by_default_test.rb

package info (click to toggle)
ruby-state-machines-activemodel 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 276 kB
  • sloc: ruby: 860; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require_relative 'test_helper'

class MachineByDefaultTest < BaseTestCase
  def setup
    @model = new_model
    @machine = StateMachines::Machine.new(@model, integration: :active_model)
  end

  def test_should_not_have_action
    assert_nil @machine.action
  end

  def test_should_use_transactions
    assert_equal true, @machine.use_transactions
  end

  def test_should_not_have_any_before_callbacks
    assert_equal 0, @machine.callbacks[:before].size
  end

  def test_should_not_have_any_after_callbacks
    assert_equal 0, @machine.callbacks[:after].size
  end
end