summaryrefslogtreecommitdiffstats
path: root/test/functional/my_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-30 08:32:31 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-30 08:32:31 +0000
commitdb5bd2b2de4733b3c900468edf4eb35896e4f723 (patch)
treed6f86917faf3374f1a878f2566857b57b19852d8 /test/functional/my_controller_test.rb
parentf7782c46480f8d5ab995c988ea265d12eb7ad0a9 (diff)
downloadredmine-db5bd2b2de4733b3c900468edf4eb35896e4f723.tar.gz
redmine-db5bd2b2de4733b3c900468edf4eb35896e4f723.zip
My page - Spent time: configurable number of days to display (#8761).
git-svn-id: http://svn.redmine.org/redmine/trunk@15942 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r--test/functional/my_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index b64b311a2..043ab8cdf 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -221,6 +221,18 @@ class MyControllerTest < Redmine::ControllerTest
end
end
+ def test_update_page_with_blank_preferences
+ user = User.generate!(:language => 'en')
+ @request.session[:user_id] = user.id
+
+ xhr :post, :update_page, :settings => {'timelog' => {'days' => '14'}}
+ assert_response :success
+ assert_include '$("#block-timelog").html(', response.body
+ assert_include '14 days', response.body
+
+ assert_equal({:days => "14"}, user.reload.pref.my_page_settings('timelog'))
+ end
+
def test_page_layout
get :page_layout
assert_response :success