File: model_test.rb

package info (click to toggle)
ruby-state-machines-activerecord 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 340 kB
  • sloc: ruby: 1,922; makefile: 5
file content (12 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative 'test_helper'
require_relative 'files/models/post'

class ModelTest < ActiveSupport::TestCase
  def test_should_have_draft_state_in_defaut_machine
    assert_equal 'draft', Post.new.state
  end

  def test_should_have_the_correct_integration
    assert_equal StateMachines::Integrations::ActiveRecord, StateMachines::Integrations.match(Post)
  end
end