Merged r1307 to r1369 from trunk.

git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1370 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-28 10:36:12 +00:00
parent be071deae2
commit 10191813ec
139 changed files with 1936 additions and 874 deletions
@@ -1,5 +1,5 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
# Copyright (C) 2006-2008 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
@@ -61,13 +61,21 @@ class RepositoriesGitControllerTest < Test::Unit::TestCase
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal 2, assigns(:entries).size
assert_equal ['delete.png', 'edit.png'], assigns(:entries).collect(&:name)
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
assert_not_nil entry
assert_equal 'file', entry.kind
assert_equal 'images/edit.png', entry.path
end
def test_browse_at_given_revision
get :browse, :id => 3, :path => ['images'], :rev => '7234cb2750b63f47bff735edc50a1c0a433c2518'
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entries)
assert_equal ['delete.png'], assigns(:entries).collect(&:name)
end
def test_changes
get :changes, :id => 3, :path => ['images', 'edit.png']
assert_response :success
@@ -93,6 +101,14 @@ class RepositoriesGitControllerTest < Test::Unit::TestCase
assert @response.body.include?('WITHOUT ANY WARRANTY')
end
def test_directory_entry
get :entry, :id => 3, :path => ['sources']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'sources', assigns(:entry).name
end
def test_diff
# Full diff of changeset 2f9c0091
get :diff, :id => 3, :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'