Fix tests

This commit is contained in:
John Firebaugh
2013-03-08 20:37:19 -08:00
parent 764f76977b
commit da902061d6
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@
<meta charset='utf-8'>
<title>Mocha Tests</title>
<link rel="stylesheet" href="lib/mocha.css">
<link rel="stylesheet" href="../css/maki.css">
</head>
<body>
<div id="mocha"></div>
+1
View File
@@ -4,6 +4,7 @@
<meta charset='utf-8'>
<title>Mocha Tests</title>
<link rel="stylesheet" href="lib/mocha.css">
<link rel="stylesheet" href="../css/maki.css">
</head>
<body>
<div id="mocha"></div>
+4 -2
View File
@@ -1,9 +1,11 @@
describe("iD.svg.Points", function () {
var surface,
projection = Object,
filter = d3.functor(true);
filter = d3.functor(true),
context;
beforeEach(function () {
context = iD();
surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))
.call(iD.svg.Surface());
});
@@ -12,7 +14,7 @@ describe("iD.svg.Points", function () {
var node = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0], _poi: true}),
graph = iD.Graph([node]);
surface.call(iD.svg.Points(projection), graph, [node], filter);
surface.call(iD.svg.Points(projection, context), graph, [node], filter);
expect(surface.select('.point')).to.be.classed('tag-amenity');
expect(surface.select('.point')).to.be.classed('tag-amenity-cafe');