jamesfredley commented on code in PR #15480:
URL: https://github.com/apache/grails-core/pull/15480#discussion_r2875566746
##########
grails-test-examples/scaffolding/src/integrationTest/groovy/com/example/UserCommunityControllerSpec.groovy:
##########
@@ -28,7 +28,7 @@ import grails.testing.mixin.integration.Integration
@Integration
class UserCommunityControllerSpec extends ContainerGebSpec {
- void setup() {
+ private void ensureLoggedIn() {
to(LoginPage).login()
}
Review Comment:
Same rename applied here - `loginAsTestUser()` in 4d5d478.
##########
grails-test-examples/scaffolding/grails-app/domain/com/example/User.groovy:
##########
@@ -56,7 +56,7 @@ class User implements UserDetails {
@Override
Collection<? extends GrantedAuthority> getAuthorities() {
- roles.split('').collect { new SimpleGrantedAuthority(it) }
+ roles.split(',').collect { new SimpleGrantedAuthority(it.trim()) }
Review Comment:
Good catch - added null/blank guard with `Collections.emptyList()` return,
plus `findAll { it }` to filter empty tokens from trailing commas. Applied in
4d5d478.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]