Sha256: 0505ef643d77cbcc98fc3d060979314f2c154841c77cb2a28ebc57784d06b330

Contents?: true

Size: 503 Bytes

Versions: 22

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

# generado con pg_rails

require 'rails_helper'

RSpec.describe User do
  let(:user) { create(:user, :owner) }

  it 'se persiste' do
    expect(user).to be_persisted
    expect(UserAccount.unscoped.count).to eq 1
    expect(UserAccount.first.profiles).to include(:account__owner)
  end

  describe 'search ransacker' do
    it 'searchs' do
      results = described_class.ransack(search_cont: user.nombre).result.to_a
      expect(results).to eq [user]
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pg_rails-7.6.27 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.26 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.25 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.24 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.24.pre.5 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.24.pre.4 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.24.pre.3 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.23 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.22 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.22.pre.3 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.22.pre.2 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.22.pre.1 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.11 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.10 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.9 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.8 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.7 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.6 pg_engine/spec/models/user_spec.rb
pg_rails-7.6.21.pre.5 pg_engine/spec/models/user_spec.rb