mirror of https://gitee.com/bigwinds/arangodb
fixed routerspec and removed unneccesary logs
This commit is contained in:
parent
c6d4d7de08
commit
52b48fe586
|
@ -265,8 +265,6 @@
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message !== viewName + ' has already been spied upon') {
|
if (e.message !== viewName + ' has already been spied upon') {
|
||||||
throw e;
|
throw e;
|
||||||
} else {
|
|
||||||
console.log(e.message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
route();
|
route();
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
logsDummy,
|
logsDummy,
|
||||||
statisticBarDummy,
|
statisticBarDummy,
|
||||||
collectionsViewDummy,
|
collectionsViewDummy,
|
||||||
|
databaseDummy,
|
||||||
userBarDummy,
|
userBarDummy,
|
||||||
documentViewDummy,
|
documentViewDummy,
|
||||||
statisticsDescriptionCollectionDummy,
|
statisticsDescriptionCollectionDummy,
|
||||||
|
@ -95,6 +96,11 @@
|
||||||
fetch: function () {
|
fetch: function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
databaseDummy = {
|
||||||
|
id: "databaseCollection",
|
||||||
|
fetch: function () {
|
||||||
|
}
|
||||||
|
};
|
||||||
fakeDB = {
|
fakeDB = {
|
||||||
id: "fakeDB",
|
id: "fakeDB",
|
||||||
fetch: function () {
|
fetch: function () {
|
||||||
|
@ -154,6 +160,7 @@
|
||||||
spyOn(window, "ArangoUsers").andReturn(sessionDummy);
|
spyOn(window, "ArangoUsers").andReturn(sessionDummy);
|
||||||
spyOn(window, "arangoDocuments").andReturn(documentsDummy);
|
spyOn(window, "arangoDocuments").andReturn(documentsDummy);
|
||||||
spyOn(window, "arangoDocument").andReturn(documentDummy);
|
spyOn(window, "arangoDocument").andReturn(documentDummy);
|
||||||
|
spyOn(window, "ArangoDatabase").andReturn(databaseDummy);
|
||||||
spyOn(window, "GraphCollection").andReturn(graphsDummy);
|
spyOn(window, "GraphCollection").andReturn(graphsDummy);
|
||||||
spyOn(window, "FoxxCollection").andReturn(foxxDummy);
|
spyOn(window, "FoxxCollection").andReturn(foxxDummy);
|
||||||
spyOn(window, "StatisticsDescriptionCollection").andReturn(
|
spyOn(window, "StatisticsDescriptionCollection").andReturn(
|
||||||
|
@ -186,6 +193,12 @@
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
spyOn(storeDummy, "fetch");
|
spyOn(storeDummy, "fetch");
|
||||||
|
spyOn($, "ajax").andCallFake(function (opt) {
|
||||||
|
if (opt.url ==="https://www.arangodb.org/repositories/versions." +
|
||||||
|
"php?callback=parseVersions") {
|
||||||
|
opt.success("success");
|
||||||
|
}
|
||||||
|
});
|
||||||
r = new window.Router();
|
r = new window.Router();
|
||||||
});
|
});
|
||||||
it("should create a Foxx Collection", function () {
|
it("should create a Foxx Collection", function () {
|
||||||
|
@ -312,8 +325,6 @@
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message !== viewName + ' has already been spied upon') {
|
if (e.message !== viewName + ' has already been spied upon') {
|
||||||
throw e;
|
throw e;
|
||||||
} else {
|
|
||||||
console.log(e.message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
route();
|
route();
|
||||||
|
@ -519,7 +530,7 @@
|
||||||
"databaseView",
|
"databaseView",
|
||||||
"databases-menu",
|
"databases-menu",
|
||||||
{
|
{
|
||||||
collection: new window.ArangoDatabase()
|
collection: databaseDummy
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1039,6 +1050,12 @@
|
||||||
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
spyOn($, "ajax").andCallFake(function (opt) {
|
||||||
|
if (opt.url ==="https://www.arangodb.org/repositories/versions." +
|
||||||
|
"php?callback=parseVersions") {
|
||||||
|
opt.success("success");
|
||||||
|
}
|
||||||
|
});
|
||||||
r = new window.Router();
|
r = new window.Router();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue