1
0
mirror of synced 2026-05-22 21:33:16 +00:00

opaqueToken MockMvc Configuration Order

Fixes gh-7800
This commit is contained in:
Josh Cummings
2020-01-10 16:47:07 -07:00
parent ad7c44f7fd
commit 8f1d0cf528
3 changed files with 63 additions and 45 deletions
@@ -45,7 +45,7 @@ public class OAuth2ResourceServerControllerTests {
@Test
public void indexGreetsAuthenticatedUser() throws Exception {
this.mvc.perform(get("/").with(opaqueToken().attribute("sub", "ch4mpy")))
this.mvc.perform(get("/").with(opaqueToken().attributes(a -> a.put("sub", "ch4mpy"))))
.andExpect(content().string(is("Hello, ch4mpy!")));
}