From 3544bb9d3caee4896e9fd5053ba0d6186c836aab Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 2 Jan 2013 13:30:14 -0500 Subject: [PATCH] Add osmId to entity tests --- test/spec/graph/entity.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/spec/graph/entity.js b/test/spec/graph/entity.js index e2790d815..6dd5cafa0 100644 --- a/test/spec/graph/entity.js +++ b/test/spec/graph/entity.js @@ -69,6 +69,14 @@ describe('iD.Entity', function () { }); }); + describe("#osmId", function () { + it("returns a numeric osm id", function () { + expect(iD.Entity({id: 'w1234'}).osmId()).to.eql(1234); + expect(iD.Entity({id: 'n1234'}).osmId()).to.eql(1234); + expect(iD.Entity({id: 'r1234'}).osmId()).to.eql(1234); + }); + }); + describe("#created", function () { it("returns falsy by default", function () { expect(iD.Entity({id: 'w1234'}).created()).not.to.be.ok;