Skip to content

Commit 65934bf

Browse files
committed
Fixed ParseUserTest.testSaveEventuallyWhenSessionIsInvalid() so it reproduce exactly issue parse-community#827
1 parent d751e2e commit 65934bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Parse/src/test/java/com/parse/ParseUserTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,10 @@ private static void setLazy(ParseUser user) {
15571557
public void testSaveEventuallyWhenSessionIsInvalid() throws Exception {
15581558

15591559
ParseRESTCommand.server = new URL("https://api.parse.com/1");
1560-
Parse.enableLocalDatastore(RuntimeEnvironment.application);
1560+
1561+
ParseObject.registerSubclass(EventuallyPin.class);
1562+
ParseObject.registerSubclass(ParsePin.class);
1563+
Parse.setLocalDatastore(new OfflineStore(RuntimeEnvironment.application));
15611564

15621565
Parse.Configuration configuration = new Parse.Configuration.Builder(RuntimeEnvironment.application)
15631566
.build();
@@ -1580,8 +1583,6 @@ public void testSaveEventuallyWhenSessionIsInvalid() throws Exception {
15801583
when(currentUserController.getAsync()).thenReturn(Task.forResult(user));
15811584
ParseCorePlugins.getInstance().registerCurrentUserController(currentUserController);
15821585

1583-
//Parse.getEventuallyQueue().clear();
1584-
15851586
user.put("field", "data");
15861587

15871588
JSONObject mockResponse = new JSONObject();

0 commit comments

Comments
 (0)