@@ -125,6 +125,27 class RepositoriesFilesystemControllerTest < ActionController::TestCase | |||||
125 | @project.reload |
|
125 | @project.reload | |
126 | assert_nil @project.repository |
|
126 | assert_nil @project.repository | |
127 | end |
|
127 | end | |
|
128 | ||||
|
129 | def test_destroy_invalid_repository | |||
|
130 | @request.session[:user_id] = 1 # admin | |||
|
131 | ||||
|
132 | get :destroy, :id => PRJ_ID | |||
|
133 | assert_response 302 | |||
|
134 | @project.reload | |||
|
135 | assert_nil @project.repository | |||
|
136 | ||||
|
137 | @repository = Repository::Filesystem.create( | |||
|
138 | :project => Project.find(PRJ_ID), | |||
|
139 | :url => "/invalid", | |||
|
140 | :path_encoding => '' | |||
|
141 | ) | |||
|
142 | assert @repository | |||
|
143 | ||||
|
144 | get :destroy, :id => PRJ_ID | |||
|
145 | assert_response 302 | |||
|
146 | @project.reload | |||
|
147 | assert_nil @project.repository | |||
|
148 | end | |||
128 | else |
|
149 | else | |
129 | puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!" |
|
150 | puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!" | |
130 | def test_fake; assert true end |
|
151 | def test_fake; assert true end |
General Comments 0
You need to be logged in to leave comments.
Login now