mirror of
https://github.com/typeable/bloodhound.git
synced 2024-12-02 06:30:29 +03:00
Don't generate problematic geopoint names
Turns out that if you have fields from and to, that won't play nicely with geopoints. Nothing we can do but this should resolve the test error.
This commit is contained in:
parent
f564d795c6
commit
c432993313
@ -872,7 +872,14 @@ instance Arbitrary LessThan where arbitrary = sopArbitrary; shrink = genericShri
|
||||
instance Arbitrary LessThanEq where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary GreaterThan where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary GreaterThanEq where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary GeoPoint where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary GeoPoint where
|
||||
arbitrary = GeoPoint <$> (arbitrary `suchThat` reasonableFieldName) <*> arbitrary
|
||||
where
|
||||
-- These are problematic for geopoint for obvious reasons
|
||||
reasonableFieldName (FieldName "from") = False
|
||||
reasonableFieldName (FieldName "to") = False
|
||||
reasonableFieldName _ = True
|
||||
shrink = genericShrink
|
||||
instance Arbitrary NullValue where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary MinimumMatchHighLow where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
instance Arbitrary CommonMinimumMatch where arbitrary = sopArbitrary; shrink = genericShrink
|
||||
|
Loading…
Reference in New Issue
Block a user