mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
c3b6454e8e
fixes #404
14 lines
390 B
Ruby
14 lines
390 B
Ruby
require 'spec_helper'
|
|
|
|
describe "guards with params" do
|
|
let(:guard) { GuardWithParams.new }
|
|
let(:user) {GuardParamsClass.new}
|
|
|
|
it "list permitted states" do
|
|
expect(guard.aasm.states({:permitted => true}, user).map(&:name)).to eql [:reviewed]
|
|
end
|
|
|
|
it "list no states if user is blank" do
|
|
expect(guard.aasm.states({:permitted => true}, nil).map(&:name)).to eql []
|
|
end
|
|
end
|