debian-mirror-gitlab/spec/features/projects/services/user_activates_hipchat_spec.rb

41 lines
953 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'User activates HipChat', :js do
2020-04-22 19:07:51 +05:30
include_context 'project service activation'
2018-03-17 18:26:18 +05:30
context 'with standart settings' do
2020-04-22 19:07:51 +05:30
before do
stub_request(:post, /.*api.hipchat.com.*/)
end
2018-03-17 18:26:18 +05:30
it 'activates service' do
2020-04-22 19:07:51 +05:30
visit_project_integration('HipChat')
2018-03-17 18:26:18 +05:30
fill_in('Room', with: 'gitlab')
fill_in('Token', with: 'verySecret')
2020-04-22 19:07:51 +05:30
click_test_integration
2018-03-17 18:26:18 +05:30
expect(page).to have_content('HipChat activated.')
end
end
context 'with custom settings' do
2020-04-22 19:07:51 +05:30
before do
stub_request(:post, /.*chat.example.com.*/)
end
2018-03-17 18:26:18 +05:30
it 'activates service' do
2020-04-22 19:07:51 +05:30
visit_project_integration('HipChat')
2018-03-17 18:26:18 +05:30
fill_in('Room', with: 'gitlab_custom')
fill_in('Token', with: 'secretCustom')
fill_in('Server', with: 'https://chat.example.com')
2020-04-22 19:07:51 +05:30
click_test_integration
2018-03-17 18:26:18 +05:30
expect(page).to have_content('HipChat activated.')
end
end
end