-
-
Notifications
You must be signed in to change notification settings - Fork 195
/
censor_rules.rb
46 lines (40 loc) · 1.1 KB
/
censor_rules.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# == Schema Information
# Schema version: 20240313094449
#
# Table name: censor_rules
#
# id :integer not null, primary key
# info_request_id :integer
# user_id :integer
# public_body_id :integer
# text :text not null
# replacement :text not null
# last_edit_editor :string not null
# last_edit_comment :text not null
# created_at :datetime not null
# updated_at :datetime not null
# regexp :boolean default(FALSE), not null
#
FactoryBot.define do
factory :censor_rule do
text { 'some text to redact' }
replacement { '[REDACTED]' }
last_edit_editor { 'FactoryBot' }
last_edit_comment { 'Modified by rspec' }
factory :regexp_censor_rule do
text { '\w+@\w+' }
regexp { true }
end
factory :info_request_censor_rule do
info_request
end
factory :public_body_censor_rule do
public_body
end
factory :user_censor_rule do
user
end
factory :global_censor_rule do
end
end
end