Fixed that git diff displays deleted files as /dev/null (#11868).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10424 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-09-18 19:32:58 +00:00
parent 74f7fc38f0
commit 12de6a177a
5 changed files with 37 additions and 9 deletions
@@ -384,6 +384,16 @@ class RepositoriesGitControllerTest < ActionController::TestCase
end
end
def test_diff_should_show_filenames
get :diff, :id => PRJ_ID, :rev => 'deff712f05a90d96edbd70facc47d944be5897e3', :type => 'inline'
assert_response :success
assert_template 'diff'
# modified file
assert_select 'th.filename', :text => 'sources/watchers_controller.rb'
# deleted file
assert_select 'th.filename', :text => 'test.txt'
end
def test_save_diff_type
@request.session[:user_id] = 1 # admin
user = User.find(1)