Reference value constants from specs (#33479)
This commit is contained in:
parent
b0634b2943
commit
efcd4ea5de
7 changed files with 19 additions and 12 deletions
|
@ -824,8 +824,7 @@ RSpec.describe Account do
|
|||
it { is_expected.to_not allow_values(account_note_over_limit).for(:note) }
|
||||
|
||||
it { is_expected.to allow_value(fields_empty_name_value).for(:fields) }
|
||||
it { is_expected.to_not allow_value(fields_over_limit).for(:fields) }
|
||||
it { is_expected.to_not allow_value(fields_empty_name).for(:fields) }
|
||||
it { is_expected.to_not allow_values(fields_over_limit, fields_empty_name).for(:fields) }
|
||||
end
|
||||
|
||||
context 'when account is remote' do
|
||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe Appeal do
|
|||
it { is_expected.to validate_length_of(:text).is_at_most(described_class::TEXT_LENGTH_LIMIT) }
|
||||
|
||||
context 'with a strike created too long ago' do
|
||||
let(:strike) { Fabricate.build :account_warning, created_at: 100.days.ago }
|
||||
let(:strike) { Fabricate.build :account_warning, created_at: (described_class::MAX_STRIKE_AGE * 2).ago }
|
||||
|
||||
it { is_expected.to_not allow_values(strike).for(:strike).against(:base).on(:create) }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue