Add UserDetailsResourceFactoryBean.fromString

Fixes gh-4568
This commit is contained in:
Rob Winch
2017-09-22 20:08:19 -05:00
parent b59265c641
commit bc99f8aff3
2 changed files with 19 additions and 0 deletions

View File

@@ -86,6 +86,13 @@ public class UserDetailsResourceFactoryBeanTest {
.hasStackTraceContaining("invalidFormatHere");
}
@Test
public void getObjectWhenStringSingleUserThenGetsSingleUser() throws Exception {
this.factory = UserDetailsResourceFactoryBean.fromString("user=password,ROLE_USER");
assertLoaded();
}
private void assertLoaded() throws Exception {
Collection<UserDetails> users = factory.getObject();