summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_cvs_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-24 04:03:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-24 04:03:43 +0000
commita2e47f9fbaf5b2c119f183a16b36540167b5742e (patch)
treed1e0a3f1dcbcb7045661e2a3f27454de59b8b0db /test/functional/repositories_cvs_controller_test.rb
parente51aeb5a40fb966e34d47154f63c60722091094e (diff)
downloadredmine-a2e47f9fbaf5b2c119f183a16b36540167b5742e.tar.gz
redmine-a2e47f9fbaf5b2c119f183a16b36540167b5742e.zip
scm: cvs: fix CVS diffs do not handle new files properly (#7615).
Contributed by Jim Naslund. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4939 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_cvs_controller_test.rb')
-rw-r--r--test/functional/repositories_cvs_controller_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index 5e2a1dc91..ca040e3f2 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -154,6 +154,24 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
:content => /watched.remove_all_watcher/
end
+
+ def test_diff_new_files
+ @repository.fetch_changesets
+ @repository.reload
+ get :diff, :id => PRJ_ID, :rev => 1, :type => 'inline'
+ assert_response :success
+ assert_template 'diff'
+ assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_in' },
+ :content => /watched.remove_watcher/
+ assert_tag :tag => 'th', :attributes => { :class => 'filename' },
+ :content => /test\/README/
+ assert_tag :tag => 'th', :attributes => { :class => 'filename' },
+ :content => /test\/images\/delete.png /
+ assert_tag :tag => 'th', :attributes => { :class => 'filename' },
+ :content => /test\/images\/edit.png/
+ assert_tag :tag => 'th', :attributes => { :class => 'filename' },
+ :content => /test\/sources\/watchers_controller.rb/
+ end
def test_annotate
@repository.fetch_changesets