-# redMine - project management software
-# Copyright (C) 2006-2008 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
assert_equal 'file', entry.kind
assert_equal 'directory/edit.png', entry.path
end
-
+
def test_browse_at_given_revision
get :show, :id => PRJ_ID, :path => [], :rev => 3
assert_response :success
assert_equal ['directory', 'doc-deleted.txt', 'doc-ls.txt', 'doc-mkdir.txt'],
assigns(:entries).collect(&:name)
end
-
+
def test_changes
get :changes, :id => PRJ_ID, :path => ['doc-mkdir.txt']
assert_response :success
assert_template 'changes'
assert_tag :tag => 'h2', :content => 'doc-mkdir.txt'
end
-
+
def test_entry_show
get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt']
assert_response :success
:attributes => { :class => /line-num/ },
:sibling => { :tag => 'td', :content => /Show help message/ }
end
-
+
def test_entry_download
get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'], :format => 'raw'
assert_response :success
# File content
assert @response.body.include?('Show help message')
end
-
+
def test_directory_entry
get :entry, :id => PRJ_ID, :path => ['directory']
assert_response :success
# Line 11 removed
assert_tag :tag => 'th',
:content => /11/,
- :sibling => { :tag => 'td',
+ :sibling => { :tag => 'td',
:attributes => { :class => /diff_out/ },
:content => /Display more information/ }
end
-
+
def test_annotate
get :annotate, :id => PRJ_ID, :path => ['doc-mkdir.txt']
assert_response :success