spec/unit/definition_spec.rb in scoped_search-4.1.2 vs spec/unit/definition_spec.rb in scoped_search-4.1.3

- old
+ new

@@ -122,6 +122,13 @@ field2 = @subdefinition.define(on: 'foo', only_explicit: true) field3 = @subdefinition.define(on: 'bar') @subdefinition.fields.should eq(foo: field2, bar: field3) end end + + describe '#default_fields_for' do + it "finds fields when there's a field not directly mapped to a DB column" do + @definition.define(:on => :custom_flag, :complete_value => { :true => true, :false => false }, :ext_method => :search_by_custom_flag) + @definition.default_fields_for("").should eq([]) + end + end end