mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-28 16:07:51 +00:00
Add coverage for rule_ids not matching rules
This commit is contained in:
parent
e8e63fc330
commit
ead7583ea3
|
@ -170,6 +170,12 @@ RSpec.describe Report do
|
|||
it { is_expected.to_not allow_value(rule.id).for(:rule_ids) }
|
||||
end
|
||||
|
||||
context 'with extra rule ids on a violation' do
|
||||
subject { Fabricate.build :report, category: :violation }
|
||||
|
||||
it { is_expected.to_not allow_value([nil, Fabricate(:rule).id]).for(:rule_ids) }
|
||||
end
|
||||
|
||||
def comment_over_limit
|
||||
'a' * described_class::COMMENT_SIZE_LIMIT * 2
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue