aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-26 11:13:38 -0700
committerLouise Crow <louise.crow@gmail.com>2013-06-26 11:13:38 -0700
commit411aee219e14fe3d942699f230f7a8e3ed70bfe0 (patch)
treecbd41460afc2f0e24d7490d3034eee2544f3bac5 /spec/controllers/user_controller_spec.rb
parent9ccc03bc7d4c4e9064a9217d6e332abfb3f15b7f (diff)
parent0d9de53bdccf20cc2884f0ad896d5e9dd2edee03 (diff)
Merge branch 'release/0.12' into wdtk
Conflicts: locale/he_IL/app.po locale/hr_HR/app.po locale/nb_NO/app.po locale/uk/app.po spec/models/info_request_spec.rb
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 1d8e3dcc3..b09594b9c 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -66,6 +66,11 @@ end
describe UserController, "when signing in" do
render_views
+ before do
+ # Don't call out to external url during tests
+ controller.stub!(:country_from_ip).and_return('gb')
+ end
+
def get_last_postredirect
post_redirects = PostRedirect.find_by_sql("select * from post_redirects order by id desc limit 1")
post_redirects.size.should == 1
@@ -226,6 +231,11 @@ end
describe UserController, "when signing up" do
render_views
+ before do
+ # Don't call out to external url during tests
+ controller.stub!(:country_from_ip).and_return('gb')
+ end
+
it "should be an error if you type the password differently each time" do
post :signup, { :user_signup => { :email => 'new@localhost', :name => 'New Person',
:password => 'sillypassword', :password_confirmation => 'sillypasswordtwo' }