1
0
Fork 0

Fixed tests for gharial adapter. They did use the old format

This commit is contained in:
Michael Hackstein 2014-06-26 16:55:45 +02:00
parent 68309a2d83
commit ec5a8eec1f
2 changed files with 28 additions and 26 deletions

View File

@ -306,7 +306,6 @@ function EventDispatcherControls(list, nodeShaper, edgeShaper, start, dispatcher
callbacks.nodes.spot = dispatcher.events.EXPAND; callbacks.nodes.spot = dispatcher.events.EXPAND;
}; };
console.log(dispatcherConfig.edgeEditor.adapter);
createNewNodeCB(); createNewNodeCB();
createViewCBs(); createViewCBs();
createConnectCBs(); createConnectCBs();

View File

@ -77,30 +77,33 @@
break; break;
case "POST": case "POST":
if (req.url.match(/_api\/cursor$/)) { if (req.url.match(/_api\/cursor$/)) {
req.success({result: req.success({
[ result: [
[{ [
vertex: node1, [{
path: { vertex: node1,
edges: [], path: {
vertices: [ edges: [],
node1 vertices: [
] node1
} ]
}
},{
vertex: node2, },{
path: { vertex: node2,
edges: [ path: {
edge edges: [
], edge
vertices: [ ],
node1, vertices: [
node2 node1,
] node2
} ]
}] }
]}); }]
]
]
});
} else if (req.url.match(/_api\/gharial\/myGraph\/edge/)) { } else if (req.url.match(/_api\/gharial\/myGraph\/edge/)) {
req.success({_id: "1-2"}); req.success({_id: "1-2"});
} else { } else {
@ -520,7 +523,7 @@
inner.push(constructPath(ncol, ecol, nid, key)); inner.push(constructPath(ncol, ecol, nid, key));
}); });
} }
return res; return [res];
}; };
spyOn($, "ajax").andCallFake(function(req) { spyOn($, "ajax").andCallFake(function(req) {
var urlParts = req.url.split("/"), var urlParts = req.url.split("/"),