Show More
@@ -20,7 +20,8 b'' | |||||
20 |
|
20 | |||
21 | import pytest |
|
21 | import pytest | |
22 |
|
22 | |||
23 |
from rhodecode.tests import assert_session_flash |
|
23 | from rhodecode.tests import assert_session_flash | |
|
24 | from rhodecode.tests.utils import AssertResponse | |||
24 | from rhodecode.model.db import Session |
|
25 | from rhodecode.model.db import Session | |
25 | from rhodecode.model.settings import SettingsModel |
|
26 | from rhodecode.model.settings import SettingsModel | |
26 |
|
27 | |||
@@ -150,12 +151,14 b' class TestAuthSettingsController(object)' | |||||
150 | 'egg:rhodecode-enterprise-ce#rhodecode,' |
|
151 | 'egg:rhodecode-enterprise-ce#rhodecode,' | |
151 | 'egg:rhodecode-enterprise-ce#ldap', |
|
152 | 'egg:rhodecode-enterprise-ce#ldap', | |
152 | csrf_token) |
|
153 | csrf_token) | |
|
154 | invalid_port_value = 'invalid-port-number' | |||
153 | response = self._post_ldap_settings(params, override={ |
|
155 | response = self._post_ldap_settings(params, override={ | |
154 |
'port': |
|
156 | 'port': invalid_port_value, | |
155 | }) |
|
157 | }) | |
156 | response.mustcontain( |
|
158 | assertr = AssertResponse(response) | |
157 | '<span class="error-message">"invalid-port-number"' |
|
159 | assertr.element_contains( | |
158 | ' is not a number</span>') |
|
160 | '.form .field #port ~ .error-message', | |
|
161 | invalid_port_value) | |||
159 |
|
162 | |||
160 | def test_ldap_error_form(self, csrf_token): |
|
163 | def test_ldap_error_form(self, csrf_token): | |
161 | params = self._enable_plugins( |
|
164 | params = self._enable_plugins( |
General Comments 0
You need to be logged in to leave comments.
Login now