diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-04 06:23:00 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-04 06:23:00 +0000 |
commit | af50c1e13e6786695b823a32c3b2e778277e7f64 (patch) | |
tree | aee2786bcc9204bb1d14c88ad8ff2567cc006aaa | |
parent | 3b75e9f90a81a128b2c00a8f60523254ef78c114 (diff) | |
download | redmine-af50c1e13e6786695b823a32c3b2e778277e7f64.tar.gz redmine-af50c1e13e6786695b823a32c3b2e778277e7f64.zip |
scm: git: add test that diff type is saved in user preference (#10152)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8760 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/repositories_git_controller_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index 33984fdf7..24a9fad2d 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -313,6 +313,26 @@ class RepositoriesGitControllerTest < ActionController::TestCase end end + def test_save_diff_type + @request.session[:user_id] = 1 # admin + user = User.find(1) + get :diff, + :id => PRJ_ID, + :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7' + assert_response :success + assert_template 'diff' + user.reload + assert_equal "inline", user.pref[:diff_type] + get :diff, + :id => PRJ_ID, + :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7', + :type => 'sbs' + assert_response :success + assert_template 'diff' + user.reload + assert_equal "sbs", user.pref[:diff_type] + end + def test_annotate get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'] assert_response :success |