4d29d70b98
* remove dev-leased-kv flag, handle non-secret responses in the console * skip lease tests for now * use the newer collection api for ember-page-object * include generic in types that can have a v2 * add tests for generic v2 * isolate kv v2 logic in the secret-engine model and add unit tests
37 lines
887 B
JavaScript
37 lines
887 B
JavaScript
import { moduleForModel, test } from 'ember-qunit';
|
|
import Ember from 'ember';
|
|
|
|
moduleForModel('secret-engine', 'Unit | Model | secret-engine', {
|
|
needs: ['model:mount-options'],
|
|
});
|
|
|
|
test('modelTypeForKV is secret by default', function(assert) {
|
|
let model;
|
|
Ember.run(() => {
|
|
model = this.subject();
|
|
assert.equal(model.get('modelTypeForKV'), 'secret');
|
|
});
|
|
});
|
|
|
|
test('modelTypeForKV is secret-v2 for kv v2', function(assert) {
|
|
let model;
|
|
Ember.run(() => {
|
|
model = this.subject({
|
|
options: { version: 2 },
|
|
type: 'kv',
|
|
});
|
|
assert.equal(model.get('modelTypeForKV'), 'secret-v2');
|
|
});
|
|
});
|
|
|
|
test('modelTypeForKV is secret-v2 for generic v2', function(assert) {
|
|
let model;
|
|
Ember.run(() => {
|
|
model = this.subject({
|
|
options: { version: 2 },
|
|
type: 'kv',
|
|
});
|
|
assert.equal(model.get('modelTypeForKV'), 'secret-v2');
|
|
});
|
|
});
|