Extract secret size constants in Webhook model (#35104)
This commit is contained in:
parent
e9b1c1edfe
commit
54f9a1b43b
2 changed files with 12 additions and 3 deletions
|
|
@ -8,6 +8,8 @@ RSpec.describe Webhook do
|
|||
describe 'Validations' do
|
||||
subject { Fabricate.build :webhook }
|
||||
|
||||
it { is_expected.to validate_length_of(:secret).is_at_least(described_class::SECRET_LENGTH_MIN) }
|
||||
|
||||
it { is_expected.to validate_presence_of(:events) }
|
||||
|
||||
it { is_expected.to_not allow_values([], %w(account.invalid)).for(:events) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue