mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Remove test for unpopular values with a wiki page,
Restore test for unpopular keys with a wiki page
This commit is contained in:
@@ -85,7 +85,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('does not include unpopular keys with a wiki page', function() {
|
||||
it('includes unpopular keys with a wiki page', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.keys({query: 'amen'}, callback);
|
||||
|
||||
@@ -96,7 +96,10 @@ describe('iD.serviceTaginfo', function() {
|
||||
);
|
||||
server.respond();
|
||||
|
||||
expect(callback).to.have.been.calledWith(null, [{'title':'amenity', 'value':'amenity'}]);
|
||||
expect(callback).to.have.been.calledWith(null, [
|
||||
{'title':'amenity', 'value':'amenity'},
|
||||
{'title':'amenityother', 'value':'amenityother'}
|
||||
]);
|
||||
});
|
||||
|
||||
it('sorts keys with \':\' below keys without \':\'', function() {
|
||||
@@ -217,22 +220,6 @@ describe('iD.serviceTaginfo', function() {
|
||||
expect(callback).to.have.been.calledWith(null, []);
|
||||
});
|
||||
|
||||
it('does not include unpopular values with a wiki page', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.values({key: 'amenity', query: 'par'}, callback);
|
||||
|
||||
server.respondWith('GET', /\/key\/values/,
|
||||
[200, { 'Content-Type': 'application/json' },
|
||||
'{"data":[{"value":"parking","description":"A place for parking cars", "fraction":1.0},' +
|
||||
'{"value":"party","description":"A place for partying", "fraction":0.0, "in_wiki": true}]}']
|
||||
);
|
||||
server.respond();
|
||||
|
||||
expect(callback).to.have.been.calledWith(null, [
|
||||
{'value':'parking','title':'A place for parking cars'},
|
||||
]);
|
||||
});
|
||||
|
||||
it('excludes values with capital letters and some punctuation', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.values({key: 'amenity', query: 'par'}, callback);
|
||||
|
||||
Reference in New Issue
Block a user