Ensure that different features produce different results

This commit is contained in:
Shane Kilkelly 2017-11-10 16:19:43 +00:00
parent 3a4edeaf4c
commit 600191b2af

View file

@ -497,7 +497,10 @@ describe "ProjectController", ->
it 'should produce the expected results', -> it 'should produce the expected results', ->
result = @ids.map (i) => result = @ids.map (i) =>
@ProjectController._isInPercentageRollout('abcd', i, 50) @ProjectController._isInPercentageRollout('abcd', i, 50)
expect(result).to.deep.equal [ expect(
@ids.map (i) =>
@ProjectController._isInPercentageRollout('abcd', i, 50)
).to.deep.equal [
false, false,
false, false,
false, false,
@ -519,5 +522,30 @@ describe "ProjectController", ->
false, false,
true true
] ]
expect(
@ids.map (i) =>
@ProjectController._isInPercentageRollout('efgh', i, 50)
).to.deep.equal [
false,
false,
false,
false,
true,
false,
false,
true,
false,
false,
true,
true,
true,
false,
true,
false,
true,
true,
false,
false
]