]> source.dussan.org Git - redmine.git/commitdiff
Merged r3903 from trunk.
authorEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 04:29:46 +0000 (04:29 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 04:29:46 +0000 (04:29 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3953 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/account_controller_test.rb

index 17d19dfe18b3676194bc660fa00ab2fabe89d5fe..ce3d13f104cc21822f5a604808d0ff3e4d0106f2 100644 (file)
@@ -153,4 +153,27 @@ class AccountControllerTest < ActionController::TestCase
     assert_redirected_to ''
     assert_nil @request.session[:user_id]
   end
+
+  context "GET #register" do
+    context "with self registration on" do
+      setup do
+        Setting.self_registration = '3'
+        get :register
+      end
+      
+      should_respond_with :success
+      should_render_template :register
+      should_assign_to :user
+    end
+    
+    context "with self registration off" do
+      setup do
+        Setting.self_registration = '0'
+        get :register
+      end
+
+      should_redirect_to('/') { home_url }
+    end
+  end
+  
 end