@@ -308,6 +308,32 class RepositoriesSubversionControllerTest < ActionController::TestCase | |||
|
308 | 308 | assert_nil @project.repository |
|
309 | 309 | end |
|
310 | 310 | |
|
311 | def test_destroy_invalid_repository | |
|
312 | @request.session[:user_id] = 1 # admin | |
|
313 | @repository.fetch_changesets | |
|
314 | @repository.reload | |
|
315 | assert @repository.changesets.count > 0 | |
|
316 | ||
|
317 | get :destroy, :id => PRJ_ID | |
|
318 | assert_response 302 | |
|
319 | ||
|
320 | @project.reload | |
|
321 | assert_nil @project.repository | |
|
322 | ||
|
323 | @repository = Repository::Subversion.create(:project => @project, | |
|
324 | :url => "file:///invalid") | |
|
325 | assert @repository | |
|
326 | @repository.fetch_changesets | |
|
327 | @repository.reload | |
|
328 | assert_equal 0, @repository.changesets.count | |
|
329 | ||
|
330 | get :destroy, :id => PRJ_ID | |
|
331 | assert_response 302 | |
|
332 | ||
|
333 | @project.reload | |
|
334 | assert_nil @project.repository | |
|
335 | end | |
|
336 | ||
|
311 | 337 | else |
|
312 | 338 | puts "Subversion test repository NOT FOUND. Skipping functional tests !!!" |
|
313 | 339 | def test_fake; assert true end |
General Comments 0
You need to be logged in to leave comments.
Login now