]> source.dussan.org Git - redmine.git/commitdiff
Add a test for my page with all blocks.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 3 Dec 2012 22:06:04 +0000 (22:06 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 3 Dec 2012 22:06:04 +0000 (22:06 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10934 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/my_controller_test.rb

index f5f5f06b1d9bcccf55080bcaf4b3b5e4c17ed8eb..7fe581f2f9ff978eb76ea00e4e62c3a93f062d84 100644 (file)
@@ -58,6 +58,17 @@ class MyControllerTest < ActionController::TestCase
     end
   end
 
+  def test_page_with_all_blocks
+    blocks = MyController::BLOCKS.keys
+    preferences = User.find(2).pref
+    preferences[:my_page_layout] = {'top' => blocks}
+    preferences.save!
+
+    get :page
+    assert_response :success
+    assert_select 'div.mypage-box', blocks.size
+  end
+
   def test_my_account_should_show_editable_custom_fields
     get :account
     assert_response :success