chore: Account auto resolution time validation (#3651)

This commit is contained in:
Shivam Chahar 2022-01-19 13:16:21 +05:30 committed by GitHub
parent 1b36143d27
commit 9617137688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 18 additions and 16 deletions

View file

@ -5,6 +5,7 @@ require 'rails_helper'
RSpec.describe Account do
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_numericality_of(:auto_resolve_duration).is_greater_than_or_equal_to(1) }
it { is_expected.to validate_numericality_of(:auto_resolve_duration).is_less_than_or_equal_to(999) }
it { is_expected.to have_many(:users).through(:account_users) }
it { is_expected.to have_many(:account_users) }