mirror of https://gitee.com/bigwinds/arangodb
Added implementation for a current database model
This commit is contained in:
parent
2e9f38f352
commit
0996649a6e
|
@ -5,8 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
window.CurrentDatabase = Backbone.Model.extend({
|
||||
|
||||
url: "/_api/database/current"
|
||||
|
||||
});
|
||||
}());
|
||||
|
|
Binary file not shown.
|
@ -13,9 +13,11 @@
|
|||
});
|
||||
|
||||
it("should request /_api/database/current on fetch", function() {
|
||||
spyOn($, "ajax");
|
||||
spyOn($, "ajax").andCallFake(function(opt) {
|
||||
expect(opt.url).toEqual("/_api/database/current");
|
||||
expect(opt.type).toEqual("GET");
|
||||
});
|
||||
model.fetch();
|
||||
expect($.ajax).toHaveBeenCalledWith("/_api/database/current", {type: "GET"});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue