Skip to content

Commit

Permalink
undo unit test changes
Browse files Browse the repository at this point in the history
Signed-off-by: pulak-opti <[email protected]>
  • Loading branch information
pulak-opti committed Oct 24, 2024
1 parent fe10f9a commit d855727
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/optimizely_user_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ func (s *OptimizelyUserContextTestSuite) TestDecideOptionsBypassUps() {
// should return variationId2 set by UPS
s.Equal(variationKey2, decision.VariationKey)
userProfileService.AssertCalled(s.T(), "Lookup", s.userID)
userProfileService.AssertNotCalled(s.T(), "Save", mock.Anything)

options = append(options, decide.IgnoreUserProfileService)
decision = userContext.Decide(flagKey, options)
Expand All @@ -893,6 +894,8 @@ func (s *OptimizelyUserContextTestSuite) TestDecideOptionsBypassUps() {
// should not lookup, ignore variationId2 set by UPS and return variationId1
s.Equal(variationKey1, decision.VariationKey)
userProfileService.AssertNumberOfCalls(s.T(), "Lookup", 1)
// also should not save either
userProfileService.AssertNotCalled(s.T(), "Save", mock.Anything)
}

func (s *OptimizelyUserContextTestSuite) TestDecideOptionsExcludeVariables() {
Expand Down

0 comments on commit d855727

Please sign in to comment.