@@ -156,7 +156,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
156 | 156 | assert_equal [], results |
|
157 | 157 | end |
|
158 | 158 | |
|
159 |
def test_ |
|
|
159 | def test_test_connection_with_correct_host_and_port | |
|
160 | 160 | auth_source = AuthSourceLdap.find(1) |
|
161 | 161 | |
|
162 | 162 | assert_nothing_raised Net::LDAP::Error do |
@@ -164,7 +164,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
164 | 164 | end |
|
165 | 165 | end |
|
166 | 166 | |
|
167 |
def test_ |
|
|
167 | def test_test_connection_with_incorrect_host | |
|
168 | 168 | auth_source = AuthSourceLdap.find(1) |
|
169 | 169 | auth_source.host = "badhost" |
|
170 | 170 | auth_source.save! |
@@ -174,7 +174,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
174 | 174 | end |
|
175 | 175 | end |
|
176 | 176 | |
|
177 |
def test_ |
|
|
177 | def test_test_connection_with_incorrect_port | |
|
178 | 178 | auth_source = AuthSourceLdap.find(1) |
|
179 | 179 | auth_source.port = 1234 |
|
180 | 180 | auth_source.save! |
@@ -184,7 +184,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
184 | 184 | end |
|
185 | 185 | end |
|
186 | 186 | |
|
187 |
def test_ |
|
|
187 | def test_test_connection_bind_with_account_and_password | |
|
188 | 188 | auth_source = AuthSourceLdap.find(1) |
|
189 | 189 | auth_source.account = "cn=admin,dc=redmine,dc=org" |
|
190 | 190 | auth_source.account_password = "secret" |
@@ -195,7 +195,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
195 | 195 | assert_nil auth_source.test_connection |
|
196 | 196 | end |
|
197 | 197 | |
|
198 |
def test_ |
|
|
198 | def test_test_connection_bind_without_account_and_password | |
|
199 | 199 | auth_source = AuthSourceLdap.find(1) |
|
200 | 200 | |
|
201 | 201 | assert_nil auth_source.account |
@@ -203,7 +203,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
203 | 203 | assert_nil auth_source.test_connection |
|
204 | 204 | end |
|
205 | 205 | |
|
206 |
def test_ |
|
|
206 | def test_test_connection_bind_with_incorrect_account | |
|
207 | 207 | auth_source = AuthSourceLdap.find(1) |
|
208 | 208 | auth_source.account = "cn=baduser,dc=redmine,dc=org" |
|
209 | 209 | auth_source.account_password = "secret" |
@@ -216,7 +216,7 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
216 | 216 | end |
|
217 | 217 | end |
|
218 | 218 | |
|
219 |
def test_ |
|
|
219 | def test_test_connection_bind_with_incorrect_password | |
|
220 | 220 | auth_source = AuthSourceLdap.find(1) |
|
221 | 221 | auth_source.account = "cn=admin,dc=redmine,dc=org" |
|
222 | 222 | auth_source.account_password = "badpassword" |
General Comments 0
You need to be logged in to leave comments.
Login now