Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Sep 28, 2023
1 parent d54d88c commit 49b6a51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/test/java/io/supertokens/test/FeatureFlagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.supertokens.cronjobs.Cronjobs;
import io.supertokens.cronjobs.syncCoreConfigWithDb.SyncCoreConfigWithDb;
import io.supertokens.emailpassword.EmailPassword;
import io.supertokens.featureflag.EE_FEATURES;
import io.supertokens.featureflag.FeatureFlag;
import io.supertokens.featureflag.FeatureFlagTestContent;
import io.supertokens.featureflag.exceptions.FeatureNotEnabledException;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/supertokens/test/mfa/MfaStorageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void deleteUserFromTenantTest() throws Exception {
result.process.main,
"[email protected]",
"password"
).id;
).getSupertokensUserId();

// Iterate over all both tenants and enable the same set of factors for the same user ID
for (TenantIdentifierWithStorage tid : new TenantIdentifierWithStorage[]{publicTenant, privateTenant}) {
Expand All @@ -177,7 +177,7 @@ public void deleteUserFromTenantTest() throws Exception {
assert mfaStorage.listFactors(privateTenant, userId).length == 0;
assert mfaStorage.listFactors(publicTenant, userId).length == 2;

String userEmail = EmailPassword.signIn(privateTenant, result.process.main, "[email protected]", "password").email;
String userEmail = EmailPassword.signIn(privateTenant, result.process.main, "[email protected]", "password").loginMethods[0].email;
assert userEmail.equals("[email protected]"); // Use should still exist in the private tenant since we have only disabled MFA related info

// Deleting from non existent user should return false:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import com.google.gson.JsonObject;
import io.supertokens.Main;
import io.supertokens.emailpassword.EmailPassword;
import io.supertokens.pluginInterface.emailpassword.UserInfo;

import io.supertokens.pluginInterface.authRecipe.AuthRecipeUserInfo;
import io.supertokens.test.mfa.MfaTestBase;
import io.supertokens.useridmapping.UserIdMapping;
import org.junit.Test;
Expand All @@ -33,8 +34,8 @@ public void testExternalUserIdTranslation() throws Exception {
Main main = result.process.getProcess();

JsonObject body = new JsonObject();
UserInfo user = EmailPassword.signUp(main, "[email protected]", "testPass123");
String superTokensUserId = user.id;
AuthRecipeUserInfo user = EmailPassword.signUp(main, "[email protected]", "testPass123");
String superTokensUserId = user.getSupertokensUserId();
String externalUserId = "external-user-id";

// Create user id mapping first:
Expand Down

0 comments on commit 49b6a51

Please sign in to comment.