Skip to content

Commit

Permalink
Merge pull request #41 from arnaudlewis/master
Browse files Browse the repository at this point in the history
change == to equals
  • Loading branch information
dohzya authored Jan 24, 2017
2 parents b390ba4 + d8f06e3 commit cd4b7dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/prismic/servlet/PrismicFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ private String getRefFromCookies(Cookie[] cookies) {
String experimentCookie = null;
String previewCookie = null;
for(Cookie cookie : cookies) {
if (cookie.getName() == Prismic.EXPERIMENTS_COOKIE) {
if (Prismic.EXPERIMENTS_COOKIE.equals(cookie.getName())) {
experimentCookie = cookie.getValue();
}
if (cookie.getName() == Prismic.PREVIEW_COOKIE) {
if (Prismic.PREVIEW_COOKIE.equals(cookie.getName())) {
previewCookie = cookie.getValue();
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/io/prismic/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void apiIsInitialized() {
Assert.assertEquals(
"Api object does not return the right master ref.",
micro_api.getMaster().getRef(),
"V_OpmSUAACcAE0lS"
"WH8MzyoAAGoSGJwT"
);
}

Expand Down Expand Up @@ -219,21 +219,21 @@ public void pagination() {
);
Assert.assertEquals(
"Total results size is right if page 1 requested",
20,
24,
micro_api.getForm("everything").ref(micro_api.getMaster()).submit().getTotalResultsSize()
);
Assert.assertEquals(
"Total pages is right if page 1 requested",
1,
2,
micro_api.getForm("everything").ref(micro_api.getMaster()).submit().getTotalPages()
);
Assert.assertNull(
"Previous page is right if page 1 requested",
micro_api.getForm("everything").ref(micro_api.getMaster()).submit().getPrevPage()
);
Assert.assertNull(
"Next page is right if page 1 requested",
micro_api.getForm("everything").set("page", 1).ref(micro_api.getMaster()).submit().getNextPage()
"Next page is right if page 2 requested",
micro_api.getForm("everything").set("page", 2).ref(micro_api.getMaster()).submit().getNextPage()
);
}

Expand Down

0 comments on commit cd4b7dd

Please sign in to comment.