This commit is contained in:
Asish Kumar 2026-08-12 08:39:00 -07:00 committed by GitHub
commit 95a4508f64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -44,6 +44,13 @@ describe EventType do
it 'is not valid when length is not multiple of LENGTH_STEP' do
expect(build(:event_type, program: conference.program, length: 37)).not_to be_valid
end
it 'is not valid when length is blank and does not raise during validation' do
event_type = build(:event_type, program: conference.program, length: nil)
expect { event_type.valid? }.not_to raise_error
expect(event_type).not_to be_valid
expect(event_type.errors[:length]).to be_present
end
end
end
end