Removed an unused variable and update timestamp the right way.

This commit is contained in:
RaymondLim 2013-04-02 23:15:28 -07:00
Родитель e0b52468d6
Коммит 86ab4a7583
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -148,13 +148,12 @@ define(function (require, exports, module) {
it("should have recreated cache when document timestamp is different", function () {
runs(function () {
var docTimestamp = editor.document.diskTimestamp.getTime();
// Arbitararily change the diskTimestamp
editor.document.diskTimestamp += 12345;
// update document timestamp with current time.
editor.document.diskTimestamp = new Date();
// This is an intentional repeat call to recreate the cache.
HTMLInstrumentation.scanDocument(editor.document);
// 2 calls from generateInstrumentedHTML call and one call
// from above scanDocument call. so total is 3.
expect(editor.document.getText.callCount).toBe(3);