mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 09:34:04 +02:00
Exclude presets with searchable: false from search (fixes #932)
This commit is contained in:
@@ -54,6 +54,15 @@ describe("iD.presets.Collection", function() {
|
||||
it("always includes other", function() {
|
||||
expect(c.search("blade of grass").collection.indexOf(p.other) >= 0).to.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
it("excludes presets with searchable: false", function() {
|
||||
var excluded = iD.presets.Preset('excluded', {
|
||||
tags: {},
|
||||
geometry: [],
|
||||
searchable: false
|
||||
}),
|
||||
collection = iD.presets.Collection([excluded, p.other]);
|
||||
expect(collection.search("excluded").collection).not.to.include(excluded);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user