debian-mirror-gitlab/spec/support/shared_examples/requests/graphql_shared_examples.rb

12 lines
324 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2020-03-13 15:44:24 +05:30
RSpec.shared_examples 'a working graphql query' do
2018-11-08 19:23:39 +05:30
include GraphqlHelpers
it 'returns a successful response', :aggregate_failures do
expect(response).to have_gitlab_http_status(:success)
2018-11-18 11:00:15 +05:30
expect(graphql_errors).to be_nil
2018-11-08 19:23:39 +05:30
expect(json_response.keys).to include('data')
end
end