diff --git a/management/self_service_profiles_test.go b/management/self_service_profiles_test.go index 85869dfb..f084f151 100644 --- a/management/self_service_profiles_test.go +++ b/management/self_service_profiles_test.go @@ -144,7 +144,8 @@ func TestSelfServiceProfileManager_CreateAndRevokeTicket(t *testing.T) { assert.NotEmpty(t, ticket.GetTicket()) ticketURL := ticket.GetTicket() - ticketID := ticketURL[strings.LastIndex(ticketURL, "=")+1:] + ticketURLSliced := strings.Split(ticketURL, "=") + ticketID := ticketURLSliced[len(ticketURLSliced)-1] err = api.SelfServiceProfile.RevokeTicket(context.Background(), ssop.GetID(), ticketID) assert.NoError(t, err)