@@ -379,7 +379,7 @@ describe('lib/core/decision_service', function() {
379
379
) ;
380
380
assert . strictEqual (
381
381
buildLogMessageFromArgs ( mockLogger . log . args [ 4 ] ) ,
382
- 'DECISION_SERVICE: Saved variation "control" of experiment "testExperiment" for user "decision_service_user".'
382
+ 'DECISION_SERVICE: Saved user profile for user "decision_service_user".'
383
383
) ;
384
384
} ) ;
385
385
@@ -399,11 +399,11 @@ describe('lib/core/decision_service', function() {
399
399
sinon . assert . calledWith ( userProfileLookupStub , 'decision_service_user' ) ;
400
400
sinon . assert . calledOnce ( bucketerStub ) ; // should still go through with bucketing
401
401
assert . strictEqual (
402
- buildLogMessageFromArgs ( mockLogger . log . args [ 0 ] ) ,
402
+ buildLogMessageFromArgs ( mockLogger . log . args [ 1 ] ) ,
403
403
'DECISION_SERVICE: User decision_service_user is not in the forced variation map.'
404
404
) ;
405
405
assert . strictEqual (
406
- buildLogMessageFromArgs ( mockLogger . log . args [ 1 ] ) ,
406
+ buildLogMessageFromArgs ( mockLogger . log . args [ 0 ] ) ,
407
407
'DECISION_SERVICE: Error while looking up user profile for user ID "decision_service_user": I am an error.'
408
408
) ;
409
409
} ) ;
@@ -1277,7 +1277,7 @@ describe('lib/core/decision_service', function() {
1277
1277
reasons : [ ] ,
1278
1278
} ;
1279
1279
experiment = configObj . experimentIdMap [ '594098' ] ;
1280
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1280
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1281
1281
getVariationStub . returns ( fakeDecisionResponse ) ;
1282
1282
getVariationStub . withArgs ( configObj , experiment , user ) . returns ( fakeDecisionResponseWithArgs ) ;
1283
1283
} ) ;
@@ -1493,12 +1493,11 @@ describe('lib/core/decision_service', function() {
1493
1493
decisionSource : DECISION_SOURCES . FEATURE_TEST ,
1494
1494
} ;
1495
1495
assert . deepEqual ( decision , expectedDecision ) ;
1496
- sinon . assert . calledWithExactly (
1496
+ sinon . assert . calledWith (
1497
1497
getVariationStub ,
1498
1498
configObj ,
1499
1499
experiment ,
1500
1500
user ,
1501
- { }
1502
1501
) ;
1503
1502
} ) ;
1504
1503
} ) ;
@@ -1511,7 +1510,7 @@ describe('lib/core/decision_service', function() {
1511
1510
optimizely : { } ,
1512
1511
userId : 'user1' ,
1513
1512
} ) ;
1514
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1513
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1515
1514
getVariationStub . returns ( fakeDecisionResponse ) ;
1516
1515
} ) ;
1517
1516
@@ -1550,7 +1549,7 @@ describe('lib/core/decision_service', function() {
1550
1549
result : 'var' ,
1551
1550
reasons : [ ] ,
1552
1551
} ;
1553
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1552
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1554
1553
getVariationStub . returns ( fakeDecisionResponseWithArgs ) ;
1555
1554
getVariationStub . withArgs ( configObj , 'exp_with_group' , user ) . returns ( fakeDecisionResponseWithArgs ) ;
1556
1555
} ) ;
@@ -1607,7 +1606,7 @@ describe('lib/core/decision_service', function() {
1607
1606
optimizely : { } ,
1608
1607
userId : 'user1' ,
1609
1608
} ) ;
1610
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1609
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1611
1610
getVariationStub . returns ( fakeDecisionResponse ) ;
1612
1611
} ) ;
1613
1612
0 commit comments