travis-ci
2 of 2 new or added lines in 1 file covered. (100.0%)
1673 of 2012 relevant lines covered (83.15%)
141.06 hits per line
1 |
class Other < Notice |
1✔ |
2 |
MASK = "REDACTED" |
1✔ |
3 |
REDACTION_REGEX = /google/i |
1✔ |
4 |
|
|
5 |
define_elasticsearch_mapping(works: [:description]) |
1✔ |
6 |
|
|
7 |
def self.model_name |
1✔ |
8 |
Notice.model_name
|
47✔ |
9 |
end
|
|
10 |
|
|
11 |
def to_partial_path |
1✔ |
12 |
'notices/notice'
|
× |
13 |
end
|
|
14 |
|
|
15 |
def sender_name |
1✔ |
16 |
if hide_identities?
|
8✔ |
17 |
MASK
|
× |
18 |
else
|
|
19 |
super
|
8✔ |
20 |
end
|
|
21 |
end
|
|
22 |
|
|
23 |
def principal_name |
1✔ |
24 |
if hide_identities?
|
8✔ |
25 |
MASK
|
× |
26 |
else
|
|
27 |
super
|
8✔ |
28 |
end
|
|
29 |
end
|
|
30 |
|
|
31 |
def hide_identities? |
1✔ |
32 |
recipient_name =~ REDACTION_REGEX
|
17✔ |
33 |
end
|
|
34 |
end
|