Skip to content

Commit

Permalink
Merge branch 'master' into fire-event
Browse files Browse the repository at this point in the history
  • Loading branch information
daviferreira committed Mar 6, 2015
2 parents 2b7ba47 + 192cda0 commit 142b695
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/toolbar.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*global MediumEditor, describe, it, expect, spyOn,
afterEach, beforeEach, selectElementContents, runs,
fireEvent, waitsFor, tearDown, xit, jasmine,
selectElementContentsAndFire, console */
selectElementContentsAndFire, console, Toolbar*/

describe('Toolbar TestCase', function () {
'use strict';
Expand Down Expand Up @@ -316,6 +316,14 @@ describe('Toolbar TestCase', function () {
// Remove the new element from the DOM
document.body.removeChild(element);
});
});

describe('Scroll', function () {
it('should position toolbar if shown', function () {
var editor = new MediumEditor('.editor');
spyOn(Toolbar.prototype, 'positionToolbarIfShown');
fireEvent(window, 'scroll');
expect(editor.toolbar.positionToolbarIfShown).toHaveBeenCalled();
});
});
});

0 comments on commit 142b695

Please sign in to comment.