spec/integration/plugin_test.rb in sequel-4.45.0 vs spec/integration/plugin_test.rb in sequel-4.46.0

- old
+ new

@@ -24,11 +24,11 @@ end end before do [:staff, :executives, :managers, :employees].each{|t| @db[t].delete} class ::Employee < Sequel::Model(@db) - plugin :class_table_inheritance, :key=>:kind, :table_map=>{:Staff=>:staff} + plugin :class_table_inheritance, :key=>:kind, :table_map=>{:Staff=>:staff}, :alias=>:employees end class ::Manager < Employee one_to_many :staff_members, :class=>:Staff end class ::Executive < Manager @@ -164,10 +164,10 @@ it "should handle eagerly loading one_to_many relationships" do Executive.where(:name=>'Ex').eager(:staff_members).first.staff_members.must_equal [Staff[@i2]] end it "should handle eagerly graphing one_to_many relationships" do - es = Executive.where(:name=>'Ex').eager_graph(:staff_members).all + es = Executive.where(Sequel[:employees][:name]=>'Ex').eager_graph(:staff_members).all es.must_equal [Executive[@i4]] es.map{|x| x.staff_members}.must_equal [[Staff[@i2]]] end end