Sha256: 2e2af8662a2faea7739138f5dc516e73043078214686385509aecdc1342d254b

Contents?: true

Size: 497 Bytes

Versions: 23

Compression:

Stored size: 497 Bytes

Contents

RSpec.shared_context 'with graphql query request' do
  let(:headers)   { {} }
  let(:variables) { {} }
  let(:graphql_params) do
    if Rails::VERSION::MAJOR >= 5
      [{ params: { query: query, variables: variables }, headers: headers }]
    else
      [{ query: query, variables: variables }, headers]
    end
  end

  def post_request(path = '/api/v1/graphql_auth')
    post path, *graphql_params
  end

  def get_request(path = '/api/v1/graphql_auth')
    get path, *graphql_params
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
graphql_devise-0.12.3 spec/support/contexts/graphql_request.rb
graphql_devise-0.12.2 spec/support/contexts/graphql_request.rb
graphql_devise-0.12.1 spec/support/contexts/graphql_request.rb
graphql_devise-0.12.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.11.4 spec/support/contexts/graphql_request.rb
graphql_devise-0.11.3 spec/support/contexts/graphql_request.rb
graphql_devise-0.11.2 spec/support/contexts/graphql_request.rb
graphql_devise-0.11.1 spec/support/contexts/graphql_request.rb
graphql_devise-0.11.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.10.1 spec/support/contexts/graphql_request.rb
graphql_devise-0.10.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.9.2 spec/support/contexts/graphql_request.rb
graphql_devise-0.9.1 spec/support/contexts/graphql_request.rb
graphql_devise-0.9.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.8.1 spec/support/contexts/graphql_request.rb
graphql_devise-0.8.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.7.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.6.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.5.0 spec/support/contexts/graphql_request.rb
graphql_devise-0.4.1 spec/support/contexts/graphql_request.rb