chore: 🤖 cleanup json creds code / tests (#1535)

This commit is contained in:
Randall Morey authored and GitHub committed 2022-12-16 15:06:19 -05:00
1 parent f1b7a9cd84
commit 51c1aba794
10 files changed
+117 -81

No files matched your search

@@ -22,6 +22,22 @@ module('Unit | Model | credential', function (hooks) {
assert.false(modelC.isStatic);
});
test('it has isJSON property and returns the expected values', async function (assert) {
assert.expect(3);
const store = this.owner.lookup('service:store');
const modelA = store.createRecord('credential', { type: 'json' });
const modelB = store.createRecord('credential', {
type: 'username_password',
});
const modelC = store.createRecord('credential', {
type: 'ssh_private_key',
});
assert.true(modelA.isJSON);
assert.false(modelB.isJSON);
assert.false(modelC.isJSON);
});
test('it has isUnknown property and returns the expected values', async function (assert) {
assert.expect(3);
const store = this.owner.lookup('service:store');