Merge pull request #1161 from deivid-rodriguez/bump_faker

Run specs using a newer faker
This commit is contained in:
David Rodríguez 2020-11-20 12:04:51 +01:00 committed by GitHub
commit faaa27f68c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ rails_version = case rails
rails
end
gem 'faker', '~> 0.9.5'
gem 'faker', '~> 1.0'
gem 'sqlite3', ::Gem::Version.new(rails_version) >= ::Gem::Version.new('6-0-stable') ? '~> 1.4.1' : '~> 1.3.3'
gem 'pg', '~> 1.0'
gem 'pry', '~> 0.12.2'

View File

@ -265,10 +265,12 @@ module Ransack
# end
it 'creates ransack attributes' do
person = Person.create!(name: 'Aric Smith')
s = Person.ransack(reversed_name_eq: 'htimS cirA')
expect(s.result.size).to eq(1)
expect(s.result.first).to eq Person.where(name: 'Aric Smith').first
expect(s.result.first).to eq person
end
it 'can be accessed through associations' do