From a357cf92177466f73aba1e3640efa2ef977e19b8 Mon Sep 17 00:00:00 2001
From: Raphael Sofaer <raphael@joindiaspora.com>
Date: Mon, 16 May 2011 16:33:05 -0700
Subject: [PATCH] Fix build... damn question marks.

---
 spec/controllers/registrations_controller_spec.rb | 3 ++-
 spec/controllers/sessions_controller_spec.rb      | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index 1ce5002681..f6cc2deaea 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -65,7 +65,8 @@ describe RegistrationsController do
 
       it "redirects to the home path" do
         get :create, @valid_params
-        response.should redirect_to aspects_path
+        response.should be_redirect
+        response.location.should match /^#{aspects_url}\??$/
       end
     end
 
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index 5197c3f841..f7b9a133bf 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -26,13 +26,15 @@ describe SessionsController do
   describe "#create" do
     it "redirects to /aspects for a non-mobile user" do
       post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
-      response.should redirect_to aspects_path
+      response.should be_redirect
+      response.location.should match /^#{aspects_url}\??$/
     end
 
     it "redirects to /aspects for a mobile user" do
       @request.env['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7'
       post :create, {"user" => {"remember_me" => "0", "username" => @user.username, "password" => "evankorth"}}
-      response.should redirect_to aspects_path
+      response.should be_redirect
+      response.location.should match /^#{aspects_url}\??$/
     end
 
     it 'queues up an update job' do
-- 
GitLab