Remove test for unpopular values with a wiki page,

Restore test for unpopular keys with a wiki page
This commit is contained in:
Bryan Housel
2018-11-07 11:06:48 -05:00
parent 9c02034c0d
commit a29af100df
+5 -18
View File
@@ -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);