Sha256: 6786a962d43b4350709e46bd5b122d03d95c3a1373d44449c37aacc2c7ec2d03
Contents?: true
Size: 584 Bytes
Versions: 35
Compression:
Stored size: 584 Bytes
Contents
# frozen_string_literal: true require "spec_helper" require_relative '../has_many_models' describe Mongoid::Association::Referenced::HasMany::Proxy do context 'with primary_key and foreign_key given' do let(:company) { HmmCompany.create!(p: 123) } let(:criteria) { company.emails } it 'generates correct query' do expect(criteria.selector).to eq('f' => 123) end context 'unscoped' do let(:criteria) { company.emails.unscoped } it 'generates correct query' do expect(criteria.selector).to eq('f' => 123) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems