feat: 🎸 add type-aware account display in admin UI

This commit is contained in:
Randall Morey committed 2021-06-17 14:09:31 -04:00
1 parent 5659df3336
commit 0a57865270
8 files changed
+61 -35

No files matched your search

+4 -5
View File
@@ -10,15 +10,14 @@ module('Unit | Model | account', function (hooks) {
assert.ok(model);
});
test('it has an username attribute for password account', function (assert) {
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', {
name: 'name',
type: 'password',
});
assert.notOk(model.username);
model.attributes.login_name = 'username';
assert.equal(model.username, 'username');
assert.notOk(model.accountName);
model.attributes.login_name = 'foobar';
assert.equal(model.accountName, 'foobar');
});
});