push
travis-ci
25 of 25 new or added lines in 5 files covered. (100.0%)
501 of 795 relevant lines covered (63.02%)
23.81 hits per line
1 |
class EventPolicy < ApplicationPolicy |
6✔ |
2 |
def index? |
6✔ |
3 |
true
|
66✔ |
4 |
end
|
|
5 |
|
|
6 |
def show? |
6✔ |
7 |
true
|
× |
8 |
end
|
|
9 |
|
|
10 |
def create? |
6✔ |
11 |
user.try(:has_role?, 'Librarian') |
120✔ |
12 |
end
|
|
13 |
|
|
14 |
def update? |
6✔ |
15 |
user.try(:has_role?, 'Librarian') |
60✔ |
16 |
end
|
|
17 |
|
|
18 |
def destroy? |
6✔ |
19 |
user.try(:has_role?, 'Librarian') |
60✔ |
20 |
end
|
|
21 |
end
|