ACK

On 07/09/2010 09:16 PM, Jason Guiditta wrote:
> Updated to use proper paths.
> ---
>   src/spec/controllers/users_controller_spec.rb |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/spec/controllers/users_controller_spec.rb 
> b/src/spec/controllers/users_controller_spec.rb
> index 231a533..c6ce46c 100644
> --- a/src/spec/controllers/users_controller_spec.rb
> +++ b/src/spec/controllers/users_controller_spec.rb
> @@ -37,8 +37,8 @@ describe UsersController do
>           p.permissions.any? {
>             |perm| perm.role.name.eql?('Instance Creator and User')
>           }.should be_true
> -        id = User.find(:first, :conditions =>  ['login = ?', "tuser2"]).id
> -        response.should redirect_to("http://test.host/users/show/#{id}";)
> +        user = User.find(:first, :conditions =>  ['login = ?', "tuser2"])
> +        response.should redirect_to(user_url(user))
>         end
>
>         it "fails to create pool" do
> @@ -69,8 +69,8 @@ describe UsersController do
>                                  :password =>  "testpass",
>                                  :password_confirmation =>  "testpass" }
>       }.should change{ User.count }
> -    id = User.find(:first, :conditions =>  ['login = ?', "tuser3"]).id
> -    response.should redirect_to("http://test.host/users/show/#{id}";)
> +    user = User.find(:first, :conditions =>  ['login = ?', "tuser3"])
> +    response.should redirect_to(user_url(user))
>     end
>
>     it "should not allow a regular user to create user" do

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to