mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
parent
64439cfcef
commit
4d5830efdf
4 changed files with 5 additions and 5 deletions
|
@ -5,13 +5,13 @@ RSpec.shared_examples 'iso8601' do
|
|||
it 'rejects invalid' do
|
||||
model.send("#{attribute}=", '2010-07-0')
|
||||
model.validate
|
||||
expect(model.errors).to be_added(attribute, :invalid_iso8601)
|
||||
expect(model.errors).to be_added(attribute, :invalid_iso8601_date)
|
||||
end
|
||||
|
||||
it 'accepts valid' do
|
||||
model.send("#{attribute}=", '2010-07-05')
|
||||
model.validate
|
||||
expect(model.errors).to_not be_added(attribute, :invalid_iso8601)
|
||||
expect(model.errors).to_not be_added(attribute, :invalid_iso8601_date)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue