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;
};
console.log(dispatcherConfig.edgeEditor.adapter);
createNewNodeCB();
createViewCBs();
createConnectCBs();

View File

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