mirror of
https://github.com/redmine/redmine.git
synced 2026-05-09 15:45:29 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -26,6 +26,7 @@ class RoutingMyTest < Redmine::RoutingTest
|
||||
should_route 'POST /my/account/destroy' => 'my#destroy'
|
||||
|
||||
should_route 'GET /my/page' => 'my#page'
|
||||
should_route 'POST /my/page' => 'my#update_page'
|
||||
should_route 'GET /my' => 'my#index'
|
||||
|
||||
should_route 'GET /my/api_key' => 'my#show_api_key'
|
||||
|
||||
Reference in New Issue
Block a user