test/model.rb in ohm-1.1.1 vs test/model.rb in ohm-1.1.2
- old
+ new
@@ -369,9 +369,17 @@
all = Event.all
assert all.detect {|e| e.name == "Ruby Meetup" }
assert all.detect {|e| e.name == "Ruby Tuesday" }
end
+# Fetching
+test "fetch ids" do
+ event1 = Event.create(:name => "A")
+ event2 = Event.create(:name => "B")
+
+ assert_equal [event1, event2], Event.fetch([event1.id, event2.id])
+end
+
# Sorting
test "sort all" do
Person.create :name => "D"
Person.create :name => "C"
Person.create :name => "B"