From a29af100df67e6dd63a8644d9a269cbc23f5c7fb Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 7 Nov 2018 11:06:48 -0500 Subject: [PATCH] Remove test for unpopular values with a wiki page, Restore test for unpopular keys with a wiki page --- test/spec/services/taginfo.js | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/test/spec/services/taginfo.js b/test/spec/services/taginfo.js index 20c78e661..266fdf754 100644 --- a/test/spec/services/taginfo.js +++ b/test/spec/services/taginfo.js @@ -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);