Skip to content

Commit

Permalink
fix: fix variants spec tests (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Aug 1, 2023
1 parent 4baecad commit afd37a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ func (vtc VariantTestCase) RunWithClient(client *Client) func(*testing.T) {
go func() {
// Call IsEnabled concurrently with itself to catch
// potential data races with go test -race.
client.IsEnabled(vtc.ToggleName, WithContext(vtc.Context))
client.GetVariant(vtc.ToggleName, WithVariantContext(vtc.Context))
wg.Done()
}()
result := client.IsEnabled(vtc.ToggleName, WithContext(vtc.Context))
result := client.GetVariant(vtc.ToggleName, WithVariantContext(vtc.Context))
wg.Wait()
assert.Equal(t, vtc.ExpectedResult.Enabled, result)
assert.Equal(t, vtc.ExpectedResult.Enabled, result.Enabled)
assert.Equal(t, vtc.ExpectedResult, client.GetVariant(vtc.ToggleName))
}
}
Expand Down

0 comments on commit afd37a4

Please sign in to comment.