Skip to content

Commit

Permalink
Merge branch 'fix-ci' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
twoseat committed Apr 6, 2018
2 parents 60e8cd1 + 87bd98d commit cf8b768
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
import reactor.test.StepVerifier;

import java.time.Duration;
import java.util.function.Consumer;

import static org.assertj.core.api.Assertions.assertThat;

public final class ServerInformationTest extends AbstractIntegrationTest {

Expand Down Expand Up @@ -81,11 +84,15 @@ public void getInfo() {
.build())
.map(response -> response.getLinks().getPassword())
.as(StepVerifier::create)
.expectNext("/forgot_password")
.consumeNextWith(endsWithExpectation("/forgot_password"))
.expectComplete()
.verify(Duration.ofMinutes(5));
}

private static Consumer<String> endsWithExpectation(String suffix) {
return actual -> assertThat(actual).endsWith(suffix);
}

private static Mono<String> getAuthenticationCode(UaaClient uaaClient, String clientId, String clientSecret, String password, String username) {
return requestAuthenticationCode(uaaClient, clientId, clientSecret, password, username)
.map(GetAutoLoginAuthenticationCodeResponse::getCode);
Expand Down

0 comments on commit cf8b768

Please sign in to comment.