1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

add transition specs

This commit is contained in:
doublejarvis 2019-07-20 17:07:34 +03:00 committed by Anil Kumar Maurya
parent b73e1b3fca
commit b318433361

View file

@ -296,13 +296,15 @@ describe 'current event' do
end
describe "when calling events with fire/fire!" do
it "fire should populate aasm.current_event" do
it "fire should populate aasm.current_event and transition (sleeping to showering)" do
pe.aasm.fire(:wakeup)
expect(pe.aasm.current_event).to eq :wakeup
expect(pe.aasm.current_state).to eq :showering
end
it "fire! should populate aasm.current_event" do
it "fire! should populate aasm.current_event and transition (sleeping to showering)" do
pe.aasm.fire!(:wakeup)
expect(pe.aasm.current_event).to eq :wakeup!
expect(pe.aasm.current_state).to eq :showering
end
end
end