Skip to content

Commit

Permalink
Update boolean_filter_specs : on/off support
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Lalaut committed Jun 6, 2016
1 parent 99c10eb commit 10b6a47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/active_interaction/filters/boolean_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

describe '#cast' do
context 'falsey' do
[false, '0', 'false', 'FALSE'].each do |value|
[false, '0', 'false', 'FALSE', 'off', 'OFF'].each do |value|
it "returns false for #{value.inspect}" do
expect(filter.cast(value, nil)).to be_falsey
end
end
end

context 'truthy' do
[true, '1', 'true', 'TRUE'].each do |value|
[true, '1', 'true', 'TRUE', 'on', 'ON'].each do |value|
it "returns true for #{value.inspect}" do
expect(filter.cast(value, nil)).to be_truthy
end
Expand Down

0 comments on commit 10b6a47

Please sign in to comment.