diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-14 07:20:57 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-14 07:20:57 +0000 |
commit | a20f140734e4510bef22f82027588d096f53f5bc (patch) | |
tree | 28cb1c1af1cc4158526e832036d0dc839e1794cc /test/functional/repositories_cvs_controller_test.rb | |
parent | d43bc98a497a0ee294cd641dfe793cf1d77a5647 (diff) | |
download | redmine-a20f140734e4510bef22f82027588d096f53f5bc.tar.gz redmine-a20f140734e4510bef22f82027588d096f53f5bc.zip |
scm: cvs: code clean up functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5452 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_cvs_controller_test.rb')
-rw-r--r-- | test/functional/repositories_cvs_controller_test.rb | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 8da64eda6..65c43ea29 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -96,8 +96,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'] assert_response :success assert_template 'entry' - assert_no_tag :tag => 'td', :attributes => { :class => /line-code/}, - :content => /before_filter/ + assert_no_tag :tag => 'td', + :attributes => { :class => /line-code/}, + :content => /before_filter/ end def test_entry_at_given_revision @@ -108,16 +109,18 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_response :success assert_template 'entry' # this line was removed in r3 - assert_tag :tag => 'td', :attributes => { :class => /line-code/}, - :content => /before_filter/ + assert_tag :tag => 'td', + :attributes => { :class => /line-code/}, + :content => /before_filter/ end def test_entry_not_found @repository.fetch_changesets @repository.reload get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c'] - assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ }, - :content => /The entry or revision was not found in the repository/ + assert_tag :tag => 'p', + :attributes => { :id => /errorExplanation/ }, + :content => /The entry or revision was not found in the repository/ end def test_entry_download @@ -174,23 +177,33 @@ class RepositoriesCvsControllerTest < ActionController::TestCase assert_response :success assert_template 'annotate' # 1.1 line - assert_tag :tag => 'th', :attributes => { :class => 'line-num' }, - :content => '18', - :sibling => { :tag => 'td', :attributes => { :class => 'revision' }, - :content => /1.1/, - :sibling => { :tag => 'td', :attributes => { :class => 'author' }, - :content => /LANG/ - } - } + assert_tag :tag => 'th', + :attributes => { :class => 'line-num' }, + :content => '18', + :sibling => { + :tag => 'td', + :attributes => { :class => 'revision' }, + :content => /1.1/, + :sibling => { + :tag => 'td', + :attributes => { :class => 'author' }, + :content => /LANG/ + } + } # 1.2 line - assert_tag :tag => 'th', :attributes => { :class => 'line-num' }, - :content => '32', - :sibling => { :tag => 'td', :attributes => { :class => 'revision' }, - :content => /1.2/, - :sibling => { :tag => 'td', :attributes => { :class => 'author' }, - :content => /LANG/ - } - } + assert_tag :tag => 'th', + :attributes => { :class => 'line-num' }, + :content => '32', + :sibling => { + :tag => 'td', + :attributes => { :class => 'revision' }, + :content => /1.2/, + :sibling => { + :tag => 'td', + :attributes => { :class => 'author' }, + :content => /LANG/ + } + } end else puts "CVS test repository NOT FOUND. Skipping functional tests !!!" |