@@ -49,7 +49,7 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
49 | assert_not_nil assigns(:entries) |
|
49 | assert_not_nil assigns(:entries) | |
50 | assert_not_nil assigns(:changesets) |
|
50 | assert_not_nil assigns(:changesets) | |
51 | end |
|
51 | end | |
52 |
|
52 | |||
53 | def test_browse_root |
|
53 | def test_browse_root | |
54 | get :show, :id => 3 |
|
54 | get :show, :id => 3 | |
55 | assert_response :success |
|
55 | assert_response :success | |
@@ -90,7 +90,7 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
90 | assert_equal 'file', entry.kind |
|
90 | assert_equal 'file', entry.kind | |
91 | assert_equal 'images/edit.png', entry.path |
|
91 | assert_equal 'images/edit.png', entry.path | |
92 | end |
|
92 | end | |
93 |
|
93 | |||
94 | def test_browse_at_given_revision |
|
94 | def test_browse_at_given_revision | |
95 | get :show, :id => 3, :path => ['images'], :rev => '7234cb2750b63f47bff735edc50a1c0a433c2518' |
|
95 | get :show, :id => 3, :path => ['images'], :rev => '7234cb2750b63f47bff735edc50a1c0a433c2518' | |
96 | assert_response :success |
|
96 | assert_response :success | |
@@ -105,7 +105,7 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
105 | assert_template 'changes' |
|
105 | assert_template 'changes' | |
106 | assert_tag :tag => 'h2', :content => 'edit.png' |
|
106 | assert_tag :tag => 'h2', :content => 'edit.png' | |
107 | end |
|
107 | end | |
108 |
|
108 | |||
109 | def test_entry_show |
|
109 | def test_entry_show | |
110 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'] |
|
110 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'] | |
111 | assert_response :success |
|
111 | assert_response :success | |
@@ -116,14 +116,14 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
116 | :attributes => { :class => /line-num/ }, |
|
116 | :attributes => { :class => /line-num/ }, | |
117 | :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ } |
|
117 | :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ } | |
118 | end |
|
118 | end | |
119 |
|
119 | |||
120 | def test_entry_download |
|
120 | def test_entry_download | |
121 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw' |
|
121 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw' | |
122 | assert_response :success |
|
122 | assert_response :success | |
123 | # File content |
|
123 | # File content | |
124 | assert @response.body.include?('WITHOUT ANY WARRANTY') |
|
124 | assert @response.body.include?('WITHOUT ANY WARRANTY') | |
125 | end |
|
125 | end | |
126 |
|
126 | |||
127 | def test_directory_entry |
|
127 | def test_directory_entry | |
128 | get :entry, :id => 3, :path => ['sources'] |
|
128 | get :entry, :id => 3, :path => ['sources'] | |
129 | assert_response :success |
|
129 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now