Sha256: ef29288653344c139b068b1ca184ac893cd1d1743a6a1b3ba04c2a67371a339e
Contents?: true
Size: 526 Bytes
Versions: 1
Compression:
Stored size: 526 Bytes
Contents
require 'test_helper_ar' class ArTest < Test::Unit::TestCase context 'AR' do should 'set the state' do o1 = Order.new assert_equal :open, o1.state o1.save! o2 = Order.find o1.id assert_equal 'open', o2[:state] assert_equal :open, o2.state end should 'make transition' do o = Order.new o.deliver assert_equal :delivered, o.state o.save! o.reload o = Order.find(o.id) assert_equal :delivered, o.state end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simplificator-fsm-0.3.3 | test/ar_test.rb |