Perhaps try using the same approach as we use in in TCK:
*
https://github.com/GoogleCloudPlatform/appengine-tck/blob/master/tests/appengine-tck-users/src/test/java/com/google/appengine/tck/users/UserTest.java#L46
On Thursday, May 15, 2014 12:41:02 PM UTC+2, Patrik M wrote:
>
>
> UserService isLoggedIn always returns false when using
> LocalUserServiceTestConfig, even if I set it to true using
>
> setEnvIsLoggedIn(true).
>
> Declaration
> private LocalServiceTestHelper userHelper = new LocalServiceTestHelper(new
> LocalUserServiceTestConfig());
>
>
> and in setup
>
> HashMap<String, Object> envAttr = new HashMap<String, Object>();
> envAttr.put("com.google.appengine.api.users.UserService.user_id_key", "1"
> );
> userHelper.setEnvAttributes(envAttr).setEnvAuthDomain("example.com").
> setEnvEmail("[email protected] <javascript:>").setEnvIsAdmin(false).
> setEnvIsLoggedIn(true);
>
>
> UserService userService = UserServiceFactory.getUserService();
>
> userService.isUserLoggedIn()
>
>
> This always returns false when running JUnit-test
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.