* [COMPLIANCE] Add Copyright and License Headers * chore: 🤖 update Copyright headers to satisfy our lint rules --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
29 lines
775 B
JavaScript
29 lines
775 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupTest } from 'ember-qunit';
|
|
|
|
module('Unit | Model | account', function (hooks) {
|
|
setupTest(hooks);
|
|
|
|
test('it exists', function (assert) {
|
|
let store = this.owner.lookup('service:store');
|
|
let model = store.createRecord('account', {});
|
|
assert.ok(model);
|
|
});
|
|
|
|
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',
|
|
});
|
|
assert.notOk(model.accountName);
|
|
model.login_name = 'foobar';
|
|
assert.strictEqual(model.accountName, 'foobar');
|
|
});
|
|
});
|