scm: git: code clean up functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5119 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f3822e18bd
commit
953e8e0f72
@ -49,7 +49,7 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
assert_not_nil assigns(:entries)
|
assert_not_nil assigns(:entries)
|
||||||
assert_not_nil assigns(:changesets)
|
assert_not_nil assigns(:changesets)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
get :show, :id => 3
|
get :show, :id => 3
|
||||||
assert_response :success
|
assert_response :success
|
||||||
@ -90,7 +90,7 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
assert_equal 'file', entry.kind
|
assert_equal 'file', entry.kind
|
||||||
assert_equal 'images/edit.png', entry.path
|
assert_equal 'images/edit.png', entry.path
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_at_given_revision
|
def test_browse_at_given_revision
|
||||||
get :show, :id => 3, :path => ['images'], :rev => '7234cb2750b63f47bff735edc50a1c0a433c2518'
|
get :show, :id => 3, :path => ['images'], :rev => '7234cb2750b63f47bff735edc50a1c0a433c2518'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
@ -105,7 +105,7 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
assert_template 'changes'
|
assert_template 'changes'
|
||||||
assert_tag :tag => 'h2', :content => 'edit.png'
|
assert_tag :tag => 'h2', :content => 'edit.png'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_entry_show
|
def test_entry_show
|
||||||
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
||||||
assert_response :success
|
assert_response :success
|
||||||
@ -116,14 +116,14 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
:attributes => { :class => /line-num/ },
|
:attributes => { :class => /line-num/ },
|
||||||
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
|
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_entry_download
|
def test_entry_download
|
||||||
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
|
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
# File content
|
# File content
|
||||||
assert @response.body.include?('WITHOUT ANY WARRANTY')
|
assert @response.body.include?('WITHOUT ANY WARRANTY')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_directory_entry
|
def test_directory_entry
|
||||||
get :entry, :id => 3, :path => ['sources']
|
get :entry, :id => 3, :path => ['sources']
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
Loading…
x
Reference in New Issue
Block a user