authlogic flash[:notice] does not show up in cucumber webrat step

后端 未结 4 827
一个人的身影
一个人的身影 2021-01-26 02:30

I am running BDD steps with cucumber to implement my autlogic login behavior.

 Scenario: log in
Given a registered user: \"test@test.com\" with password: \"p@ssw         


        
4条回答
  •  感情败类
    2021-01-26 03:08

    instead of the line

    flash[:notice] = "Login successful!"   
    redirect_to root_url
    

    just try rendering it instead of redirecting it.

    flash[:notice] = "Login successful!"   
    render :action => :root_url
    

    in doing this, it seems to remember flash[:notice]

    i could not get --> redirect_to root_url, :flash => { :notice => 'not found' }, :notice => Login successful!' <-- to work at all

提交回复
热议问题