Show More
@@ -18,9 +18,11 b'' | |||
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | import mock | |
|
21 | 22 | import pytest |
|
22 | 23 | |
|
23 | 24 | from rhodecode.tests import url, HG_REPO |
|
25 | from rhodecode.tests.utils import AssertResponse | |
|
24 | 26 | |
|
25 | 27 | |
|
26 | 28 | @pytest.mark.usefixtures('autologin_user', 'app') |
@@ -38,3 +40,31 b' class TestAdminRepoSettingsController:' | |||
|
38 | 40 | ]) |
|
39 | 41 | def test_simple_get(self, urlname, app): |
|
40 | 42 | app.get(url(urlname, repo_name=HG_REPO)) |
|
43 | ||
|
44 | @pytest.mark.parametrize('setting_name', [ | |
|
45 | 'rhodecode_hg_use_rebase_for_merging', | |
|
46 | ]) | |
|
47 | def test_labs_settings_enabled_hg(self, setting_name): | |
|
48 | import rhodecode | |
|
49 | vcs_settings_url = url('repo_vcs_settings', repo_name=HG_REPO) | |
|
50 | ||
|
51 | with mock.patch.dict( | |
|
52 | rhodecode.CONFIG, {'labs_settings_active': 'true'}): | |
|
53 | response = self.app.get(vcs_settings_url) | |
|
54 | ||
|
55 | assertr = AssertResponse(response) | |
|
56 | assertr.one_element_exists('#{}'.format(setting_name)) | |
|
57 | ||
|
58 | @pytest.mark.parametrize('setting_name', [ | |
|
59 | 'rhodecode_hg_use_rebase_for_merging', | |
|
60 | ]) | |
|
61 | def test_labs_settings_disabled_hg(self, setting_name): | |
|
62 | import rhodecode | |
|
63 | vcs_settings_url = url('repo_vcs_settings', repo_name=HG_REPO) | |
|
64 | ||
|
65 | with mock.patch.dict( | |
|
66 | rhodecode.CONFIG, {'labs_settings_active': 'false'}): | |
|
67 | response = self.app.get(vcs_settings_url) | |
|
68 | ||
|
69 | assertr = AssertResponse(response) | |
|
70 | assertr.no_element_exists('#{}'.format(setting_name)) |
General Comments 0
You need to be logged in to leave comments.
Login now