From: Mark Schaake <mark.scha...@gmail.com>
Date: Sun, 24 Apr 2011 07:04:36 -0700 (PDT)
Local: Sun, Apr 24 2011 10:04 am
Subject: Re: Secure module: how do you "log in" in a FunctionalTest?
I've found a workaround to this issue. To preserve the cookies from a
previous request in a FunctionalTest, you have to manually build the request. There is a helper method in FunctionTest to get you started: // Make the login request
Request request = newRequest(); // helper method from
On Apr 23, 1:50 pm, Mark Schaake <mark.scha...@gmail.com> wrote:
> Yes, I know about the org.junit.Before annotation. This doesn't work
> in that cookies from previous call are not being placed in subsequent > calls (even though looking at FunctionalTest this is what is supposed > to happen). Looks like bughttps://bugs.launchpad.net/play/+bug/497408 > as pointed out by Havoc P on stackoverflow.comhttp://stackoverflow.com/questions/5762246/playframework-secure-modul... > On Apr 22, 10:22 pm, Sam Liu <worldwin...@gmail.com> wrote:
> > There is an annotation like @Before. You can try it...
> > @Before
> > }
> > public static void testYourAction(){
> > }
> > 2011/4/23 Mark Schaake <mark.scha...@gmail.com>
> > > I want to test controller actions that are secured by Secure module
> > > How do you do this? I've tried the following:
> > > ========== code snipet ===================
> > > Which returns the expected response (redirect to home page). But then
> > > I absolutely do not want to have to write a Selenium test for every
> > > Thanks in advance,
> > > Mark
> > > --
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||