Created
January 17, 2018 20:06
-
-
Save rowanl/6b92ada64c6e0e9393515e609be0fc18 to your computer and use it in GitHub Desktop.
playframework-kubernetes - Functional test with mocked time dependency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void Given_IsBeforeEndDate_When_GetRequestIsMadeToIndexPage_Then_StatusIs200() { | |
// GIVEN | |
long beforeEndDate = 9L; | |
given(clock.instant()).willReturn(ofEpochMilli(beforeEndDate)); | |
given(clock.getZone()).willReturn(ZoneId.of("+0")); | |
// WHEN | |
WSResponse result = newClient(providePort()).url("/").get().toCompletableFuture().join(); | |
// THEN | |
assertThat(result.getStatus(), is(OK)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment