Sha256: 6c52cd611bad99031232ae5ba1fd222d10e12ca269907423affb52c3c733c7dc
Contents?: true
Size: 756 Bytes
Versions: 9
Compression:
Stored size: 756 Bytes
Contents
RSpec.describe ROM::Relation, '#qualified' do subject(:relation) { relations[:users] } include_context 'users and tasks' with_adapters do it 'qualifies all attributes' do qualified = relation.qualified expect(qualified.schema.all?(&:qualified)).to be(true) end it 'qualifies virtual attributes' do qualified = relation. left_join(:tasks, tasks[:user_id].qualified => relation[:id].qualified). select(:id, tasks[:id].func { int::count(id).as(:count) }). qualified. group(:id) expect(qualified.schema.all?(&:qualified)).to be(true) expect(qualified.to_a).to eql([{ id: 1, count: 1 }, { id: 2, count: 1 }]) end end end
Version data entries
9 entries across 9 versions & 1 rubygems