Skip to content

Commit c3e853c

Browse files
committed
remove test
1 parent 2e0ac86 commit c3e853c

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

test/spec/modules/rules_spec.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -72,37 +72,6 @@ describe('Rules Module', function() {
7272
expect(rulesets[0].modelGroups[1].selected).to.be.false;
7373
});
7474

75-
it('should select last group if none selected by weights', function() {
76-
const rulesets = [{
77-
name: 'testRuleSet',
78-
stage: 'processed-auction-request',
79-
modelGroups: [{
80-
weight: 10,
81-
selected: false,
82-
analyticsKey: 'testKey1',
83-
schema: [],
84-
rules: []
85-
}, {
86-
weight: 10,
87-
selected: false,
88-
analyticsKey: 'testKey2',
89-
schema: [],
90-
rules: []
91-
}]
92-
}];
93-
94-
// Mock Math.random to return 1.0 so randomValue equals weightSum
95-
// randomValue = 1.0 * 20 = 20
96-
// First iteration: 20 < 10? no, randomValue -= 10 = 10
97-
// Second iteration: 10 < 10? no, randomValue -= 10 = 0
98-
// No group selected in loop, so last group should be selected as fallback
99-
sandbox.stub(Math, 'random').returns(1.0);
100-
101-
rulesModule.assignModelGroups(rulesets);
102-
103-
expect(rulesets[0].modelGroups[rulesets[0].modelGroups.length - 1].selected).to.be.true;
104-
});
105-
10675
it('should use default weight of 100 when weight is not specified', function() {
10776
const rulesets = [{
10877
name: 'testRuleSet',

0 commit comments

Comments
 (0)