push
github
0 of 8 new or added lines in 8 files covered. (0.0%)
2169 existing lines in 58 files now uncovered.0 of 2253 relevant lines covered (0.0%)
0.0 hits per line
UNCOV
1
|
module Unleash |
× |
UNCOV
2
|
module Strategy |
× |
UNCOV
3
|
class UserWithId < Base |
× |
UNCOV
4
|
PARAM = 'userIds'.freeze |
× |
5 |
|
|
UNCOV
6
|
def name |
× |
UNCOV
7
|
'userWithId'
|
× |
8 |
end
|
|
9 |
|
|
10 |
# requires: params['userIds'], context.user_id,
|
|
UNCOV
11
|
def is_enabled?(params = {}, context = nil) |
× |
UNCOV
12
|
return false unless params.is_a?(Hash) && params.has_key?(PARAM) |
× |
UNCOV
13
|
return false unless params.fetch(PARAM, nil).is_a? String |
× |
NEW
|
return false unless context.instance_of?(Unleash::Context) |
× |
15 |
|
|
UNCOV
16
|
params[PARAM].split(",").map(&:strip).include?(context.user_id) |
× |
17 |
end
|
|
18 |
end
|
|
19 |
end
|
|
20 |
end
|