Skip to content

Commit 0a05514

Browse files
committed
Merge pull request #356 from ParsePlatform/wangmengyan.fix_server_url_bug
Fix default parse server url
2 parents 626218f + e3d9234 commit 0a05514

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Parse/src/main/java/com/parse/Parse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static final class Builder {
5050
private Context context;
5151
private String applicationId;
5252
private String clientKey;
53-
private String server = "https://api.parse.com/1";
53+
private String server = "https://api.parse.com/1/";
5454
private boolean localDataStoreEnabled;
5555
private List<ParseNetworkInterceptor> interceptors;
5656

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ public void tearDown() throws Exception {
8080
ParseRESTCommand.server = null;
8181
}
8282

83+
84+
@Test
85+
public void testInitializationWithDefaultParseServerURL() throws Exception {
86+
ParseRESTCommand.server = new URL("https://api.parse.com/1/");
87+
ParseRESTCommand command = new ParseRESTCommand.Builder()
88+
.httpPath("events/Appopened")
89+
.build();
90+
91+
assertEquals("https://api.parse.com/1/events/Appopened", command.url);
92+
}
93+
8394
@Test
8495
public void testPermanentFailures() throws Exception {
8596
JSONObject json = new JSONObject();

0 commit comments

Comments
 (0)