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
This commit is contained in:
parent
3b75e9f90a
commit
af50c1e13e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue