diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-04 00:09:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-04 00:09:37 +0000 |
commit | e3bdfa1a13d7e6c92716324c78b5b20c07eeb7c6 (patch) | |
tree | e8776263096b027d32d4be5118cccc87b00de2bc /spec/controllers/groups | |
parent | c1a50b8195f4e36fda9b233acbde57a449bcf6c3 (diff) | |
download | gitlab-ce-e3bdfa1a13d7e6c92716324c78b5b20c07eeb7c6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/groups')
-rw-r--r-- | spec/controllers/groups/settings/integrations_controller_spec.rb | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/spec/controllers/groups/settings/integrations_controller_spec.rb b/spec/controllers/groups/settings/integrations_controller_spec.rb index bbf215a4bb9..eee65476dab 100644 --- a/spec/controllers/groups/settings/integrations_controller_spec.rb +++ b/spec/controllers/groups/settings/integrations_controller_spec.rb @@ -67,40 +67,11 @@ describe Groups::Settings::IntegrationsController do end context 'invalid params' do - let(:url) { 'ftp://jira.localhost' } + let(:url) { 'https://jira.localhost' } it 'does not update the integration' do - expect(response).to have_gitlab_http_status(:ok) - expect(response).to render_template(:edit) - expect(integration.reload.url).not_to eq(url) - end - end - end - - describe '#test' do - context 'testable' do - let(:integration) { create(:jira_service, project: project) } - - before do - group.add_owner(user) - end - - it 'returns ok' do - allow_any_instance_of(integration.class).to receive(:test) { { success: true } } - - put :test, params: { group_id: group, id: integration.class.to_param } - - expect(response).to have_gitlab_http_status(:ok) - end - end - - context 'not testable' do - let(:integration) { create(:alerts_service, project: project) } - - it 'returns not found' do - put :test, params: { group_id: group, id: integration.class.to_param } - - expect(response).to have_gitlab_http_status(:not_found) + expect(response).to have_gitlab_http_status(:found) + expect(integration.reload.url).to eq(url) end end end |