mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 07:25:15 +02:00
Merge branch 'matkoniecz-bad-tags' of https://github.com/matkoniecz/iD into matkoniecz-matkoniecz-bad-tags
This commit is contained in:
@@ -90,7 +90,7 @@ function filterValues(allowUpperCase) {
|
||||
return function(d) {
|
||||
if (d.value.match(/[;,]/) !== null) return false; // exclude some punctuation
|
||||
if (!allowUpperCase && d.value.match(/[A-Z*]/) !== null) return false; // exclude uppercase letters
|
||||
return parseFloat(d.fraction) > 0.0 || d.in_wiki;
|
||||
return parseFloat(d.fraction) > 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('includes unpopular keys with a wiki page', function() {
|
||||
it('does not include unpopular keys with a wiki page', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.keys({query: 'amen'}, callback);
|
||||
|
||||
@@ -96,10 +96,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
);
|
||||
server.respond();
|
||||
|
||||
expect(callback).to.have.been.calledWith(null, [
|
||||
{'title':'amenity', 'value':'amenity'},
|
||||
{'title':'amenityother', 'value':'amenityother'}
|
||||
]);
|
||||
expect(callback).to.have.been.calledWith(null, [{'title':'amenity', 'value':'amenity'}]);
|
||||
});
|
||||
|
||||
it('sorts keys with \':\' below keys without \':\'', function() {
|
||||
@@ -220,7 +217,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
expect(callback).to.have.been.calledWith(null, []);
|
||||
});
|
||||
|
||||
it('includes unpopular values with a wiki page', function() {
|
||||
it('does not include unpopular values with a wiki page', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.values({key: 'amenity', query: 'par'}, callback);
|
||||
|
||||
@@ -233,7 +230,6 @@ describe('iD.serviceTaginfo', function() {
|
||||
|
||||
expect(callback).to.have.been.calledWith(null, [
|
||||
{'value':'parking','title':'A place for parking cars'},
|
||||
{'value':'party','title':'A place for partying'}
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user