##// END OF EJS Templates
Rails3: test: scm: subversion: use "repository_path_hash" for path param...
Toshi MARUYAMA -
r8810:5033a155b3e5
parent child
Show More
@@ -73,7 +73,7 class RepositoriesSubversionControllerTest < ActionController::TestCase
73 73 @repository.fetch_changesets
74 74 @project.reload
75 75 assert_equal NUM_REV, @repository.changesets.count
76 get :show, :id => PRJ_ID, :path => ['subversion_test']
76 get :show, :id => PRJ_ID, :path => repository_path_hash(['subversion_test'])[:param]
77 77 assert_response :success
78 78 assert_template 'show'
79 79 assert_not_nil assigns(:entries)
@@ -93,7 +93,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
93 93 @repository.fetch_changesets
94 94 @project.reload
95 95 assert_equal NUM_REV, @repository.changesets.count
96 get :show, :id => PRJ_ID, :path => ['subversion_test'], :rev => 4
96 get :show, :id => PRJ_ID, :path => repository_path_hash(['subversion_test'])[:param],
97 :rev => 4
97 98 assert_response :success
98 99 assert_template 'show'
99 100 assert_not_nil assigns(:entries)
@@ -106,7 +107,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
106 107 @repository.fetch_changesets
107 108 @project.reload
108 109 assert_equal NUM_REV, @repository.changesets.count
109 get :changes, :id => PRJ_ID, :path => ['subversion_test', 'folder', 'helloworld.rb' ]
110 get :changes, :id => PRJ_ID,
111 :path => repository_path_hash(['subversion_test', 'folder', 'helloworld.rb'])[:param]
110 112 assert_response :success
111 113 assert_template 'changes'
112 114
@@ -130,7 +132,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
130 132 @repository.fetch_changesets
131 133 @project.reload
132 134 assert_equal NUM_REV, @repository.changesets.count
133 get :changes, :id => PRJ_ID, :path => ['subversion_test', 'folder' ]
135 get :changes, :id => PRJ_ID,
136 :path => repository_path_hash(['subversion_test', 'folder'])[:param]
134 137 assert_response :success
135 138 assert_template 'changes'
136 139
@@ -144,7 +147,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
144 147 @repository.fetch_changesets
145 148 @project.reload
146 149 assert_equal NUM_REV, @repository.changesets.count
147 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'helloworld.c']
150 get :entry, :id => PRJ_ID,
151 :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
148 152 assert_response :success
149 153 assert_template 'entry'
150 154 end
@@ -156,7 +160,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
156 160 assert_equal NUM_REV, @repository.changesets.count
157 161 # no files in the test repo is larger than 1KB...
158 162 with_settings :file_max_size_displayed => 0 do
159 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'helloworld.c']
163 get :entry, :id => PRJ_ID,
164 :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
160 165 assert_response :success
161 166 assert_template ''
162 167 assert_equal 'attachment; filename="helloworld.c"',
@@ -169,7 +174,9 class RepositoriesSubversionControllerTest < ActionController::TestCase
169 174 @repository.fetch_changesets
170 175 @project.reload
171 176 assert_equal NUM_REV, @repository.changesets.count
172 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'helloworld.rb'], :rev => 2
177 get :entry, :id => PRJ_ID,
178 :path => repository_path_hash(['subversion_test', 'helloworld.rb'])[:param],
179 :rev => 2
173 180 assert_response :success
174 181 assert_template 'entry'
175 182 # this line was removed in r3 and file was moved in r6
@@ -182,9 +189,10 class RepositoriesSubversionControllerTest < ActionController::TestCase
182 189 @repository.fetch_changesets
183 190 @project.reload
184 191 assert_equal NUM_REV, @repository.changesets.count
185 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'zzz.c']
192 get :entry, :id => PRJ_ID,
193 :path => repository_path_hash(['subversion_test', 'zzz.c'])[:param]
186 194 assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ },
187 :content => /The entry or revision was not found in the repository/
195 :content => /The entry or revision was not found in the repository/
188 196 end
189 197
190 198 def test_entry_download
@@ -192,7 +200,9 class RepositoriesSubversionControllerTest < ActionController::TestCase
192 200 @repository.fetch_changesets
193 201 @project.reload
194 202 assert_equal NUM_REV, @repository.changesets.count
195 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'helloworld.c'], :format => 'raw'
203 get :entry, :id => PRJ_ID,
204 :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param],
205 :format => 'raw'
196 206 assert_response :success
197 207 assert_template ''
198 208 assert_equal 'attachment; filename="helloworld.c"', @response.headers['Content-Disposition']
@@ -203,7 +213,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
203 213 @repository.fetch_changesets
204 214 @project.reload
205 215 assert_equal NUM_REV, @repository.changesets.count
206 get :entry, :id => PRJ_ID, :path => ['subversion_test', 'folder']
216 get :entry, :id => PRJ_ID,
217 :path => repository_path_hash(['subversion_test', 'folder'])[:param]
207 218 assert_response :success
208 219 assert_template 'show'
209 220 assert_not_nil assigns(:entry)
@@ -313,7 +324,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
313 324 assert_equal NUM_REV, @repository.changesets.count
314 325 ['inline', 'sbs'].each do |dt|
315 326 get :diff, :id => PRJ_ID, :rev => 6, :rev_to => 2,
316 :path => ['subversion_test', 'folder'], :type => dt
327 :path => repository_path_hash(['subversion_test', 'folder'])[:param],
328 :type => dt
317 329 assert_response :success
318 330 assert_template 'diff'
319 331
@@ -330,7 +342,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
330 342 @repository.fetch_changesets
331 343 @project.reload
332 344 assert_equal NUM_REV, @repository.changesets.count
333 get :annotate, :id => PRJ_ID, :path => ['subversion_test', 'helloworld.c']
345 get :annotate, :id => PRJ_ID,
346 :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
334 347 assert_response :success
335 348 assert_template 'annotate'
336 349 end
@@ -340,7 +353,8 class RepositoriesSubversionControllerTest < ActionController::TestCase
340 353 @repository.fetch_changesets
341 354 @project.reload
342 355 assert_equal NUM_REV, @repository.changesets.count
343 get :annotate, :id => PRJ_ID, :rev => 8, :path => ['subversion_test', 'helloworld.c']
356 get :annotate, :id => PRJ_ID, :rev => 8,
357 :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
344 358 assert_response :success
345 359 assert_template 'annotate'
346 360 assert_tag :tag => 'h2', :content => /@ 8/
General Comments 0
You need to be logged in to leave comments. Login now