Skip to content

Commit

Permalink
failing spec to demonstrate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhardikjoshi committed Mar 30, 2023
1 parent 6b8ef21 commit 93a3560
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/e2e/query_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,21 @@ def custom_prop_method
expect(lesson.teachers.where(name: 'aoeuo').to_a).to be_empty
end
end

context 'when association used after identity-scope' do
subject { Level.experts.teachers }

before do
stub_node_class('Level') do
property :name
has_many :out, :teachers, model_class: 'Teacher', type: 'level'
scope :experts, -> { where("#{identity}.name = 'expert'") }
end
end
let!(:expert_level) { Level.create(name: 'expert', teachers: [mrjames]) }

it { is_expected.to contain_exactly mrjames }
end
end

describe 'batch finding' do
Expand Down

0 comments on commit 93a3560

Please sign in to comment.