Skip to content

Commit

Permalink
Updated test function
Browse files Browse the repository at this point in the history
  • Loading branch information
dasarinaidu committed Oct 9, 2024
1 parent 3a5abdb commit ae90d16
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func (ur *UserRetentionSettingsTestSuite) testPositiveInputValues(settingName st

if err == nil {
settings, err1 := ur.client.Management.Setting.ByID(settingName)
if assert.NoError(t, err1, "Failed to retrieve settings") {
assert.Equal(t, settingName, settings.Name)
assert.Equal(t, inputValue.value, settings.Value)
if assert.NoError(ur.T(), err1, "Failed to retrieve settings") {
assert.Equal(ur.T(), settingName, settings.Name)
assert.Equal(ur.T(), inputValue.value, settings.Value)
}
}
logrus.Infof("%s setting is updated to %s ; %s", settingName, inputValue.value, inputValue.description)
Expand All @@ -65,7 +65,7 @@ func (ur *UserRetentionSettingsTestSuite) testNegativeInputValues(settingName st
for _, inputValue := range tests {
ur.T().Run(inputValue.name, func(t *testing.T) {
err := updateUserRetentionSettings(ur.client, settingName, inputValue.value)
assert.Error(t, err, "Expected an error for input '%s', but got nil", inputValue.value)
assert.Error(ur.T(), err, "Expected an error for input '%s', but got nil", inputValue.value)

if err != nil {
ur.validateError(err, inputValue.description)
Expand Down

0 comments on commit ae90d16

Please sign in to comment.