mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
tests update
This commit is contained in:
@ -1,8 +1,22 @@
|
||||
describe("History Service suite", function() {
|
||||
it("contains spec with an expectation", function() {
|
||||
|
||||
it("starts at -1", function() {
|
||||
var mockPiskelController = {};
|
||||
var historyService = new pskl.service.HistoryService(mockPiskelController);
|
||||
var mockShortcutService = {};
|
||||
var historyService = new pskl.service.HistoryService(mockPiskelController, mockShortcutService);
|
||||
expect(historyService.currentIndex).toBe(-1);
|
||||
});
|
||||
|
||||
it("is at 0 after init", function() {
|
||||
var mockPiskelController = {
|
||||
serialize : function () {
|
||||
return 'serialized-piskel';
|
||||
}
|
||||
};
|
||||
var mockShortcutService = {
|
||||
addShortcut : function () {}
|
||||
};
|
||||
var historyService = new pskl.service.HistoryService(mockPiskelController, mockShortcutService);
|
||||
historyService.init();
|
||||
expect(historyService.currentIndex).toBe(0);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user