@@ -1,16 +1,16 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 |
# |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 |
# |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
@@ -72,7 +72,7 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||||
72 | assert_equal 'file', entry.kind |
|
72 | assert_equal 'file', entry.kind | |
73 | assert_equal 'directory/edit.png', entry.path |
|
73 | assert_equal 'directory/edit.png', entry.path | |
74 | end |
|
74 | end | |
75 |
|
75 | |||
76 | def test_browse_at_given_revision |
|
76 | def test_browse_at_given_revision | |
77 | get :show, :id => PRJ_ID, :path => [], :rev => 3 |
|
77 | get :show, :id => PRJ_ID, :path => [], :rev => 3 | |
78 | assert_response :success |
|
78 | assert_response :success | |
@@ -81,14 +81,14 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||||
81 | assert_equal ['directory', 'doc-deleted.txt', 'doc-ls.txt', 'doc-mkdir.txt'], |
|
81 | assert_equal ['directory', 'doc-deleted.txt', 'doc-ls.txt', 'doc-mkdir.txt'], | |
82 | assigns(:entries).collect(&:name) |
|
82 | assigns(:entries).collect(&:name) | |
83 | end |
|
83 | end | |
84 |
|
84 | |||
85 | def test_changes |
|
85 | def test_changes | |
86 | get :changes, :id => PRJ_ID, :path => ['doc-mkdir.txt'] |
|
86 | get :changes, :id => PRJ_ID, :path => ['doc-mkdir.txt'] | |
87 | assert_response :success |
|
87 | assert_response :success | |
88 | assert_template 'changes' |
|
88 | assert_template 'changes' | |
89 | assert_tag :tag => 'h2', :content => 'doc-mkdir.txt' |
|
89 | assert_tag :tag => 'h2', :content => 'doc-mkdir.txt' | |
90 | end |
|
90 | end | |
91 |
|
91 | |||
92 | def test_entry_show |
|
92 | def test_entry_show | |
93 | get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'] |
|
93 | get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'] | |
94 | assert_response :success |
|
94 | assert_response :success | |
@@ -99,14 +99,14 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||||
99 | :attributes => { :class => /line-num/ }, |
|
99 | :attributes => { :class => /line-num/ }, | |
100 | :sibling => { :tag => 'td', :content => /Show help message/ } |
|
100 | :sibling => { :tag => 'td', :content => /Show help message/ } | |
101 | end |
|
101 | end | |
102 |
|
102 | |||
103 | def test_entry_download |
|
103 | def test_entry_download | |
104 | get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'], :format => 'raw' |
|
104 | get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'], :format => 'raw' | |
105 | assert_response :success |
|
105 | assert_response :success | |
106 | # File content |
|
106 | # File content | |
107 | assert @response.body.include?('Show help message') |
|
107 | assert @response.body.include?('Show help message') | |
108 | end |
|
108 | end | |
109 |
|
109 | |||
110 | def test_directory_entry |
|
110 | def test_directory_entry | |
111 | get :entry, :id => PRJ_ID, :path => ['directory'] |
|
111 | get :entry, :id => PRJ_ID, :path => ['directory'] | |
112 | assert_response :success |
|
112 | assert_response :success | |
@@ -123,11 +123,11 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||||
123 | # Line 11 removed |
|
123 | # Line 11 removed | |
124 | assert_tag :tag => 'th', |
|
124 | assert_tag :tag => 'th', | |
125 | :content => /11/, |
|
125 | :content => /11/, | |
126 |
:sibling => { :tag => 'td', |
|
126 | :sibling => { :tag => 'td', | |
127 | :attributes => { :class => /diff_out/ }, |
|
127 | :attributes => { :class => /diff_out/ }, | |
128 | :content => /Display more information/ } |
|
128 | :content => /Display more information/ } | |
129 | end |
|
129 | end | |
130 |
|
130 | |||
131 | def test_annotate |
|
131 | def test_annotate | |
132 | get :annotate, :id => PRJ_ID, :path => ['doc-mkdir.txt'] |
|
132 | get :annotate, :id => PRJ_ID, :path => ['doc-mkdir.txt'] | |
133 | assert_response :success |
|
133 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now