Add a test passing mixed values to `allow_value`
This commit is contained in:
parent
0209b3e48c
commit
7e11f3e1d1
|
@ -80,6 +80,10 @@ describe Shoulda::Matchers::ActiveModel::AllowValueMatcher do
|
|||
it "rejects several bad values (#{bad_values.map(&:inspect).join(', ')})" do
|
||||
model.should_not allow_value(*bad_values).for(:attr)
|
||||
end
|
||||
|
||||
it "rejects a mix of both good and bad values" do
|
||||
model.should_not allow_value('12345', *bad_values).for(:attr)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a single value' do
|
||||
|
|
Loading…
Reference in New Issue