Sha256: 9825324c7a6dbd9a9c03b62e2ac090d08ba6521fd2df71c3b5bbf6b7424eb1b7
Contents?: true
Size: 619 Bytes
Versions: 11
Compression:
Stored size: 619 Bytes
Contents
require 'rails_helper' RSpec.describe 'Additional Queries' do include_context 'with graphql query request' let(:public_user) { create(:user, :confirmed) } context 'when using the user model' do let(:query) do <<-GRAPHQL query { publicUser( id: #{public_user.id} ) { email name } } GRAPHQL end before { post_request } it 'fetches a user by ID' do expect(json_response[:data][:publicUser]).to include( email: public_user.email, name: public_user.name ) end end end
Version data entries
11 entries across 11 versions & 1 rubygems