Hi
I am currently struggeling to setup controller tests.

Can sombody please paste a complete & working controller test file that
works with the permission system of hobo 8.5.
I have spent quite some time trying to figure this out, and tairing my  
hair out.

That would be really great!!

Thanx

Am 24.12.2008 um 23:41 schrieb Mike Sugarbaker:

>
> So, where does that line go?
>
> On Dec 23, 11:27 pm, solars <[email protected]> wrote:
>> Hi,
>>
>> I'm using this line:
>> @controller.class.protect_from_forgery :secret => "mysecret"
>>
>> to work around this, but this is very quick and dirty, came across
>> it once when testing controller tests in hobo
>>
>> maybe an intermediate solution :)
>>
>> greetings
>>
>> On Tue, Dec 23, 2008 at 04:39:32PM -0800, GamaFranco wrote:
>>
>>> The following test:
>>
>>>  def test_should_login_and_redirect
>>>     post :login, :login => 'championship_manager', :password =>  
>>> 'test'
>>>     assert session[:user]
>>>     assert_response :redirect
>>>     assert flash[:notice] =~ /You have logged in./, "Flash should
>>> welcome user."
>>>   end
>>
>>> Retrieves the error:
>>> "No :secret given to the #protect_from_forgery call."
>>
>>> The environment/test.rb file has:
>>> config.action_controller.allow_forgery_protection    = false
>>
>>> This is a strange error. Is hobo overwriting the default rails  
>>> forgery
>>> protection?
>>
>>> Thanks,
>>>   TF
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to