Files
threshold-ui/addons/api/tests/unit/models/account-test.js
T

23 lines
702 B
JavaScript
Raw Normal View History

2020-09-14 10:45:56 -04:00
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
2020-09-16 14:29:02 -04:00
module('Unit | Model | account', function (hooks) {
2020-09-14 10:45:56 -04:00
setupTest(hooks);
2020-09-16 14:29:02 -04:00
test('it exists', function (assert) {
2020-09-14 10:45:56 -04:00
let store = this.owner.lookup('service:store');
let model = store.createRecord('account', {});
assert.ok(model);
});
2021-06-17 14:09:31 -04:00
test('it has an accountName attribute for password account', function (assert) {
assert.expect(2);
const store = this.owner.lookup('service:store');
let model = store.createRecord('account', {
type: 'password',
});
2021-06-17 14:09:31 -04:00
assert.notOk(model.accountName);
model.attributes.login_name = 'foobar';
assert.equal(model.accountName, 'foobar');
});
2020-09-14 10:45:56 -04:00
});