added positive test for max length check
Dieser Commit ist enthalten in:
Ursprung
49f82b4014
Commit
e12faad1f5
1 geänderte Dateien mit 17 neuen und 0 gelöschten Zeilen
|
@ -73,6 +73,23 @@ describe CustomWizard::UpdateValidator do
|
||||||
expect(
|
expect(
|
||||||
updater.errors.messages[:step_1_field_3].first
|
updater.errors.messages[:step_1_field_3].first
|
||||||
).to eq(I18n.t('wizard.field.too_long', label: 'Composer', max: max_length))
|
).to eq(I18n.t('wizard.field.too_long', label: 'Composer', max: max_length))
|
||||||
|
|
||||||
|
hundred_chars_string = "This is a line, exactly hundred characters long and not more even a single character more than that."
|
||||||
|
updater = perform_validation('step_1', step_1_field_1: hundred_chars_string)
|
||||||
|
expect(
|
||||||
|
updater.errors.messages[:step_1_field_1].first
|
||||||
|
).to eq(nil)
|
||||||
|
|
||||||
|
updater = perform_validation('step_1', step_1_field_2: hundred_chars_string)
|
||||||
|
expect(
|
||||||
|
updater.errors.messages[:step_1_field_2].first
|
||||||
|
).to eq(nil)
|
||||||
|
|
||||||
|
updater = perform_validation('step_1', step_1_field_3: hundred_chars_string)
|
||||||
|
expect(
|
||||||
|
updater.errors.messages[:step_1_field_3].first
|
||||||
|
).to eq(nil)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'standardises boolean entries' do
|
it 'standardises boolean entries' do
|
||||||
|
|
Laden …
In neuem Issue referenzieren