mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Fix bug in distanceBetween, update docs, deal with null queries
This commit is contained in:
@@ -93,6 +93,11 @@ describe "Enterprises service", ->
|
||||
Enterprises.updateDistance "asdf"
|
||||
expect(Enterprises.calculateDistance).toHaveBeenCalledWith("asdf")
|
||||
|
||||
it "resets the distance when query is null", ->
|
||||
spyOn(Enterprises, "resetDistance")
|
||||
Enterprises.updateDistance null
|
||||
expect(Enterprises.resetDistance).toHaveBeenCalled()
|
||||
|
||||
it "resets the distance when query is blank", ->
|
||||
spyOn(Enterprises, "resetDistance")
|
||||
Enterprises.updateDistance ""
|
||||
|
||||
Reference in New Issue
Block a user