VulpesOS/gaia/apps/calendar/test/unit/templates/account_test.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

33 lines
808 B
JavaScript
Executable file

define(function(require) {
'use strict';
var Account = require('templates/account');
suite('Templates.Account', function() {
var subject;
suiteSetup(function() {
subject = Account;
});
function renderHTML(type, options) {
return subject[type].render(options);
}
test('#provider', function() {
var output = renderHTML('provider', { name: 'yahoo' });
assert.include(output, 'yahoo');
assert.include(output, 'li class="yahoo" role="presentation"');
assert.include(output, 'a data-l10n-id="preset-yahoo" role="option"');
});
test('#account', function() {
var output = renderHTML('account', { id: '1' });
assert.include(output, 'li id="account-1" role="presentation"');
assert.include(output, 'a href="/update-account/1" role="option"');
});
});
});