Skip to content

Commit

Permalink
fix: PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 committed Feb 28, 2024
1 parent 3bb6adf commit 9285632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,8 @@ public void shouldNormaliseFields() throws Exception {
JsonArray bulkImportUsers = getResponse.get("users").getAsJsonArray();
assertEquals(1, bulkImportUsers.size());

JsonParser parser = new JsonParser();
JsonObject bulkImportUserJson = bulkImportUsers.get(0).getAsJsonObject();
JsonArray loginMethods = parser.parse(bulkImportUserJson.get("rawData").getAsString()).getAsJsonObject().getAsJsonArray("loginMethods");
JsonArray loginMethods = bulkImportUserJson.getAsJsonArray("loginMethods");

for (int i = 0; i < loginMethods.size(); i++) {
JsonObject loginMethod = loginMethods.get(i).getAsJsonObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

import io.supertokens.ProcessState;
import io.supertokens.pluginInterface.STORAGE_TYPE;
import io.supertokens.pluginInterface.bulkimport.BulkImportUser;
import io.supertokens.storageLayer.StorageLayer;
import io.supertokens.test.TestingProcessManager;
import io.supertokens.test.Utils;
Expand Down Expand Up @@ -150,7 +151,7 @@ public void shouldReturn200Response() throws Exception {
assertEquals(1, bulkImportUsers.size());
JsonObject bulkImportUserJson = bulkImportUsers.get(0).getAsJsonObject();
bulkImportUserJson.get("status").getAsString().equals("NEW");
bulkImportUserJson.get("rawData").getAsString().equals(rawData);
BulkImportUser.fromJson(bulkImportUserJson).toRawData().equals(rawData);

process.kill();
Assert.assertNotNull(process.checkOrWaitForEvent(ProcessState.PROCESS_STATE.STOPPED));
Expand Down

0 comments on commit 9285632

Please sign in to comment.