Skip to content

Commit

Permalink
Merge pull request #84 from nextcloud/tests/test_error_view
Browse files Browse the repository at this point in the history
Add errror views test
  • Loading branch information
ChristophWurst committed Sep 21, 2016
2 parents 0a764cb + 99de97f commit 8fc8b7d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions js/tests/views_error_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @author Steffen Lindner <mail@steffen-lidnner.de>
*
* Mail
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/


define(['views/errorview'], function(ErrorView) {

describe('ErrorView', function () {

var errorview;

beforeEach(function () {
errorview = new ErrorView({});
});

describe('Rendering', function () {

it('produces the correct HTML', function () {
errorview.render();

html = errorview.el.innerHTML.trim();
expected_html = '<div class="">\n\t<div class="icon-mail"></div>\n\t<h2>An unknown error occurred</h2>\n</div>';
expect(html).toContain(expected_html);

});
});
});
});

0 comments on commit 8fc8b7d

Please sign in to comment.