14 lines
284 B
Ruby
14 lines
284 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require 'spec_helper'
|
||
|
|
||
|
describe ApplicationRecord do
|
||
|
describe '#id_in' do
|
||
|
let(:records) { create_list(:user, 3) }
|
||
|
|
||
|
it 'returns records of the ids' do
|
||
|
expect(User.id_in(records.last(2).map(&:id))).to eq(records.last(2))
|
||
|
end
|
||
|
end
|
||
|
end
|