From b14d829112c9c54577eae689f710b1f25aeb27d7 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Sat, 16 Dec 2023 11:17:20 +0530 Subject: [PATCH] more tests --- ...accountlinkingRecipeImplementation_test.go | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/recipe/emailpassword/accountlinkingRecipeImplementation_test.go b/recipe/emailpassword/accountlinkingRecipeImplementation_test.go index 58131db8..07fdc5be 100644 --- a/recipe/emailpassword/accountlinkingRecipeImplementation_test.go +++ b/recipe/emailpassword/accountlinkingRecipeImplementation_test.go @@ -1948,6 +1948,26 @@ func TestListUsersByAccountInfoTakesIntoAccountTenantId(t *testing.T) { assert.Equal(t, users[0].ID, tpuser.OK.User.ID) } +func TestThatEmailProxyNotSetIfEmailVerificationNotInit(t *testing.T) { + telemetry := false + supertokens.Init(supertokens.TypeInput{ + Supertokens: &supertokens.ConnectionInfo{ + ConnectionURI: "http://localhost:8080", + }, + AppInfo: supertokens.AppInfo{ + AppName: "Testing", + Origin: "http://localhost:3000", + APIDomain: "http://localhost:3001", + }, + Telemetry: &telemetry, + RecipeList: []supertokens.Recipe{ + Init(nil), + }, + }) + + assert.Nil(t, supertokens.InternalUseEmailVerificationRecipeProxyInstance) +} + // TODO: remove this function func convertEpUserToSuperTokensUser(epuser epmodels.User) supertokens.User { rUId, err := supertokens.NewRecipeUserID(epuser.ID)