##// END OF EJS Templates
scm: git: add test that diff type is saved in user preference (#10152)...
Toshi MARUYAMA -
r8640:af50c1e13e67
parent child
Show More
@@ -313,6 +313,26 class RepositoriesGitControllerTest < ActionController::TestCase
313 end
313 end
314 end
314 end
315
315
316 def test_save_diff_type
317 @request.session[:user_id] = 1 # admin
318 user = User.find(1)
319 get :diff,
320 :id => PRJ_ID,
321 :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
322 assert_response :success
323 assert_template 'diff'
324 user.reload
325 assert_equal "inline", user.pref[:diff_type]
326 get :diff,
327 :id => PRJ_ID,
328 :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
329 :type => 'sbs'
330 assert_response :success
331 assert_template 'diff'
332 user.reload
333 assert_equal "sbs", user.pref[:diff_type]
334 end
335
316 def test_annotate
336 def test_annotate
317 get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
337 get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
318 assert_response :success
338 assert_response :success
General Comments 0
You need to be logged in to leave comments. Login now