diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-27 01:07:17 +0300 |
---|---|---|
committer | Ian Baum <ibaum@gitlab.com> | 2018-03-07 01:19:39 +0300 |
commit | d77353b8b12345c1d10e427f2fc2e5a3ba03eef3 (patch) | |
tree | 1448bcdec9f32ba8b92b6cc45e735778c3df6b8f /spec | |
parent | efefd65c809f92ae5880f4c9c5e2666137f65958 (diff) |
Merge branch '43532-error-on-admin-applications-prometheus-template' into 'master'
Resolve "Error 500 on route "/admin/application_settings/services/1882/edit" -> edit Prometheus Service Template"
Closes #43532
See merge request gitlab-org/gitlab-ce!17377
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/admin/services/admin_activates_prometheus_spec.rb | 21 | ||||
-rw-r--r-- | spec/features/projects/services/user_activates_prometheus_spec.rb | 23 |
2 files changed, 44 insertions, 0 deletions
diff --git a/spec/features/admin/services/admin_activates_prometheus_spec.rb b/spec/features/admin/services/admin_activates_prometheus_spec.rb new file mode 100644 index 00000000000..904fe5b406b --- /dev/null +++ b/spec/features/admin/services/admin_activates_prometheus_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe 'Admin activates Prometheus' do + let(:admin) { create(:user, :admin) } + + before do + sign_in(admin) + + visit(admin_application_settings_services_path) + + click_link('Prometheus') + end + + it 'activates service' do + check('Active') + fill_in('API URL', with: 'http://prometheus.example.com') + click_button('Save') + + expect(page).to have_content('Application settings saved successfully') + end +end diff --git a/spec/features/projects/services/user_activates_prometheus_spec.rb b/spec/features/projects/services/user_activates_prometheus_spec.rb new file mode 100644 index 00000000000..33f884eb148 --- /dev/null +++ b/spec/features/projects/services/user_activates_prometheus_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe 'User activates Prometheus' do + let(:project) { create(:project) } + let(:user) { create(:user) } + + before do + project.add_master(user) + sign_in(user) + + visit(project_settings_integrations_path(project)) + + click_link('Prometheus') + end + + it 'activates service' do + check('Active') + fill_in('API URL', with: 'http://prometheus.example.com') + click_button('Save changes') + + expect(page).to have_content('Prometheus activated.') + end +end |