Simplify basic presence validations (#29664)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-09-05 15:36:05 +00:00
1 parent bc435c63bd
commit 5acec087ca
16 files changed
+28 -159

No files matched your search

+1 -6
View File
@@ -6,12 +6,7 @@ RSpec.describe Webhook do
let(:webhook) { Fabricate(:webhook) }
describe 'Validations' do
it 'requires presence of events' do
record = described_class.new(events: nil)
record.valid?
expect(record).to model_have_error_on_field(:events)
end
it { is_expected.to validate_presence_of(:events) }
it 'requires non-empty events value' do
record = described_class.new(events: [])