# RESTful authentication plugin test failure in Rails 2.0 Preview Release

**URL:** <https://www.ruby-forum.com/t/restful-authentication-plugin-test-failure-in-rails-2-0-preview-release/116630>\
**Category:** Rails\
**Created:** [October 8, 2007, 6:32am UTC](https://www.ruby-forum.com/t/restful-authentication-plugin-test-failure-in-rails-2-0-preview-release/116630 "2007-10-08T06:32:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 8, 2007, 6:32am UTC](https://www.ruby-forum.com/t/restful-authentication-plugin-test-failure-in-rails-2-0-preview-release/116630/1 "2007-10-08T06:32:17Z")

</div>

The following tests are failing:

test\_should\_fail\_cookie\_login  
test\_should\_login\_with\_cookie  
test\_should\_fail\_login\_and\_not\_redirect  
test\_should\_fail\_expired\_cookie\_login

Error message:

test\_should\_fail\_cookie\_login(SessionsControllerTest):  
ActionView::TemplateError: session\_url failed to generate from  
{:action=\>“show”, :controller=\>“sessions”} - you may have ambiguous  
routes, or you may need to supply additional parameters for this  
route. content\_url has the following required parameters:  
[“sessions”, :id] - are they all satisfied?  
On line #1 of app/views/sessions/new.html.erb

```
1: <% form_tag session_path do -%>
2: <p><label for="login">Login</label><br/>
3: <%= text_field_tag 'login' %></p>

```

Did anyone resolve this issue? TIA.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 8, 2007, 12:41pm UTC](https://www.ruby-forum.com/t/restful-authentication-plugin-test-failure-in-rails-2-0-preview-release/116630/2 "2007-10-08T12:41:52Z")

</div>

removed\_email\_address@domain.invalid wrote:

> The following tests are failing:
> 
> test\_should\_fail\_cookie\_login  
> test\_should\_login\_with\_cookie  
> test\_should\_fail\_login\_and\_not\_redirect  
> test\_should\_fail\_expired\_cookie\_login
> 
> Error message:
> 
> test\_should\_fail\_cookie\_login(SessionsControllerTest):  
> ActionView::TemplateError: session\_url failed to generate from  
> {:action=\>“show”, :controller=\>“sessions”} - you may have ambiguous  
> routes, or you may need to supply additional parameters for this  
> route. content\_url has the following required parameters:  
> [“sessions”, :id] - are they all satisfied?  
> On line #1 of app/views/sessions/new.html.erb
> 
> ```
> 1: <% form_tag session_path do -%>
> 2: <p><label for="login">Login</label><br/>
> 3: <%= text_field_tag 'login' %></p>
> 
> ```
> 
> Did anyone resolve this issue? TIA.

All resources in Rails 2.0 (even singular ones) are to be referred to as  
plural ones; see the Rails 2.0 PR announcement for the details.

So don’t do:

session\_path

And instead do:

sessions\_path

–  
Roderick van Domburg  
[http://www.nedforce.com](http://www.nedforce.com)
