# Restful\_authentication - some default tests failing

**URL:** <https://www.ruby-forum.com/t/restful-authentication-some-default-tests-failing/182410>\
**Category:** Rails\
**Created:** [January 27, 2010, 5:49pm UTC](https://www.ruby-forum.com/t/restful-authentication-some-default-tests-failing/182410 "2010-01-27T17:49:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 27, 2010, 5:49pm UTC](https://www.ruby-forum.com/t/restful-authentication-some-default-tests-failing/182410/1 "2010-01-27T17:49:53Z")

</div>

Hey all

I just installed restful\_authentication in a new project and have run  
it’s specs. I’m getting a few failures. Just looking at the first, i  
can’t understand why it’s failing - can anyone see?

#failing line from test  
route\_for(:controller =\> ‘users’, :action =\> ‘update’, :id =\>  
‘1’).should == “/users/1”

#reported reason for failure  
The recognized options \<{“action”=\>“show”, “id”=\>“1”,  
“controller”=\>“users”}\> did not match \<{“action”=\>“update”, “id”=\>“1”,  
“controller”=\>“users”}\>, difference: \<{“action”=\>“update”}\>  
If you’re expecting this failure, we suggest  
{:get=\>"/users/1"}.should\_not be\_routable

So, it looks like “/users/1” with a put isn’t pointing to update. But,  
when i do rake routes i see

user GET /users/:id(.:format) {:controller=\>“users”,  
:action=\>“show”}  
PUT /users/:id(.:format) {:controller=\>“users”,  
:action=\>“update”}  
DELETE /users/:id(.:format) {:controller=\>“users”,  
:action=\>“destroy”}

It looks like the route should work. And, in the console i can do this:

> > include Spec::Rails::Example::RoutingHelpers  
> > =\> Object
> 
> > params\_from(:put, ‘/users/1’)  
> > =\> {:action=\>“update”, :controller=\>“users”, :id=\>“1”}

So, i don;t understand why the test is failing. Any ideas?

thanks - max

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 27, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/restful-authentication-some-default-tests-failing/182410/2 "2010-01-27T18:01:45Z")

</div>

Max W. wrote:

> Hey all
> 
> I just installed restful\_authentication in a new project

Do yourself a favor and take it right back out again. Restful\_auth is  
based on unmaintainable, untestable generated crap code; it has no place  
in today’s Rails ecosystem. Use Authlogic instead, which is actually  
designed properly.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 27, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/restful-authentication-some-default-tests-failing/182410/3 "2010-01-27T18:11:47Z")

</div>

Thanks Marnen, AuthLogic does look good actually.
