Sha256: f73e4e6e60914fb886613fbef37eb9e8b3d7342659f211e710ee3c843a3a0a95
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
module Spree RSpec.describe Taxon, type: :model do describe '.ransack' do let!(:taxon) { create(:taxon, name: 'find-me') } let!(:other_taxon) { create(:taxon, name: 'no-thanks') } it 'handles translation' do result = described_class.ransack(name_cont: taxon.name[0..2]).result expect(result.to_a).to eq [taxon] result = described_class.search(name_cont: taxon.name[0..2]).result expect(result.to_a).to eq [taxon] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems