Sha256: 61d49e821327d33a2653c16bcb0bc42b151870735b3605b6c3a986c95b56955c

Contents?: true

Size: 477 Bytes

Versions: 11

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResourceNameSetter do
  describe '#call' do
    subject(:prepared_operation) { described_class.new(mapping_name).call(operation) }

    let(:operation)    { double(:operation) }
    let(:mapping_name) { :user }

    it 'sets a gql name to the operation' do
      expect(prepared_operation.instance_variable_get(:@resource_name)).to eq(:user)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
graphql_devise-0.14.3 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.14.2 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.14.1 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.14.0 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.6 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.5 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.4 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.3 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.2 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.1 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
graphql_devise-0.13.0 spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb