Skip to content

Commit

Permalink
fix test_embed_struct in test_read_only.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Dec 17, 2022
1 parent 077c674 commit 8e0e46d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test_read_only.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ def test_struct_find
end

def test_embed_struct
skip "not yet"

students = Student.where(enrolled: [university: [name: "Stanford"]])
.include(:name)
.include(enrolled: [:name, university: [ :address ]])
.include(enrolled: [:name, university: [ :address, :name ]])
.read_only.all

assert_equal 3, students.size
students.each do |st|
assert st.enrolled.any? {|e| e.is_a?(Struct) && e.university.name.eql?('Stanford')}
end

end
end
end

0 comments on commit 8e0e46d

Please sign in to comment.