Advertisement
NameL3ss

validation duration

Dec 1st, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. context 'valid range of duration' do
  3. before do
  4. @event_configuration = EventsConfiguration.new(account_id: account.id, duration: 5, event_type: 'speeding', event_value: 9)
  5. end
  6.  
  7. it 'valid duration' do
  8. expect(@event_configuration.valid?).to eq true
  9. end
  10.  
  11. it 'invalid range duration' do
  12. @event_configuration.duration = 1000
  13. expect(@event_configuration.valid?).to eq false
  14. end
  15. end
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement