spec/models/data_grid_spec.rb in marty-2.1.4 vs spec/models/data_grid_spec.rb in marty-2.1.5
- old
+ new
@@ -493,18 +493,24 @@
it "should raise on nil attr values" do
dg_from_import("G9", G9)
expect{lookup_grid_helper('infinity',
"G9",
- {"state" => nil, "ltv" => 81},
+ {"ltv" => 81},
)}.to raise_error(/matches > 1/)
- res = lookup_grid_helper('infinity',
+ err = /Data Grid lookup failed/
+ expect{lookup_grid_helper('infinity',
"G9",
{"state" => "CA", "ltv" => nil},
+ false, false)}.to raise_error(err)
+
+ res = lookup_grid_helper('infinity',
+ "G9",
+ {"state" => nil, "ltv" => 81},
false, false)
- expect(res).to eq [123,"G9"]
+ expect(res).to eq [456,"G9"]
end
it "should handle boolean keys" do
res = lookup_grid_helper('infinity',
"G4",