Sha256: 17d08dc4381f4d96e9bb43d73500e187b6052c1ee07e49dd879ce175f75ab745

Contents?: true

Size: 813 Bytes

Versions: 7

Compression:

Stored size: 813 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class Gecko::Record::UserAdapterTest < Minitest::Test
  include TestingAdapter
  include SharedAdapterExamples

  let(:adapter)       { @client.User }
  let(:plural_name)   { 'users' }
  let(:record_class)  { Gecko::Record::User }

  def test_initializes_adapter
    assert_instance_of(Gecko::Record::UserAdapter, @client.User)
  end

  # Can't build users via API
  undef :test_build
  undef :test_build_with_attributes
  undef :test_saving_new_record
  undef :test_saving_new_invalid_record
  undef :test_saving_record_with_idempotency_key

  def test_current
    VCR.use_cassette('users#current') do
      assert_instance_of(Gecko::Record::User, @client.User.current)
      assert(@client.User.current, 'User.current is identity mapped')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gecko-ruby-0.12.3 test/record/user_adapter_test.rb
gecko-ruby-0.12.2 test/record/user_adapter_test.rb
gecko-ruby-0.12.1 test/record/user_adapter_test.rb
gecko-ruby-0.12.0 test/record/user_adapter_test.rb
gecko-ruby-0.11.1 test/record/user_adapter_test.rb
gecko-ruby-0.11.0 test/record/user_adapter_test.rb
gecko-ruby-0.10.0 test/record/user_adapter_test.rb