blob: 0338eb43f8d118bcc1625c18742f4b718ef34c02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
RSpec.shared_examples 'creating a new HTTP integration' do
it 'creates a new integration' do
post_graphql_mutation(mutation, current_user: current_user)
new_integration = ::AlertManagement::HttpIntegration.last!
integration_response = mutation_response['integration']
expect(response).to have_gitlab_http_status(:success)
expect(integration_response['id']).to eq(GitlabSchema.id_from_object(new_integration).to_s)
expect(integration_response['type']).to eq('HTTP')
expect(integration_response['name']).to eq(new_integration.name)
expect(integration_response['active']).to eq(new_integration.active)
expect(integration_response['token']).to eq(new_integration.token)
expect(integration_response['url']).to eq(new_integration.url)
expect(integration_response['apiUrl']).to eq(nil)
end
end
|