Skip to content

Fix default parse server url #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Parse/src/main/java/com/parse/Parse.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static final class Builder {
private Context context;
private String applicationId;
private String clientKey;
private String server = "https://api.parse.com/1";
private String server = "https://api.parse.com/1/";
private boolean localDataStoreEnabled;
private List<ParseNetworkInterceptor> interceptors;

Expand Down
11 changes: 11 additions & 0 deletions Parse/src/test/java/com/parse/ParseRESTCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ public void tearDown() throws Exception {
ParseRESTCommand.server = null;
}


@Test
public void testInitializationWithDefaultParseServerURL() throws Exception {
ParseRESTCommand.server = new URL("https://api.parse.com/1/");
ParseRESTCommand command = new ParseRESTCommand.Builder()
.httpPath("events/Appopened")
.build();

assertEquals("https://api.parse.com/1/events/Appopened", command.url);
}

@Test
public void testPermanentFailures() throws Exception {
JSONObject json = new JSONObject();
Expand Down