feat: 🎸 Add indexedDb parser (#2068)
* feat: 🎸 Add indexedDb parser ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12164 --------- Co-authored-by: Lisbet Alvarez <lisbet.alvarez@hashicorp.com>
This commit is contained in:
1 parent
bd5e3da1f4
commit
d72fa0d6e3
24 files changed
+890
-178
No files matched your search
@@ -13,7 +13,7 @@ module('Unit | Model | user', function (hooks) {
|
||||
|
||||
test('it has an `addAccounts` method that users a specific POST API endpoint and serialization', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.post('/v1/users/123abc:add-accounts', (schema, request) => {
|
||||
this.server.post('/users/123abc:add-accounts', (schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
account_ids: ['123_abc', 'foobar'],
|
||||
@@ -44,7 +44,7 @@ module('Unit | Model | user', function (hooks) {
|
||||
|
||||
test('it has a `removeAccounts` method that users a specific POST API endpoint and serialization', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.post('/v1/users/123abc:remove-accounts', (schema, request) => {
|
||||
this.server.post('/users/123abc:remove-accounts', (schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
account_ids: ['1', '3'],
|
||||
@@ -75,7 +75,7 @@ module('Unit | Model | user', function (hooks) {
|
||||
|
||||
test('it has a `removeAccount` method that deletes a single account set using `removeAccounts` method', async function (assert) {
|
||||
assert.expect(1);
|
||||
this.server.post('/v1/users/123abc:remove-accounts', (schema, request) => {
|
||||
this.server.post('/users/123abc:remove-accounts', (schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
account_ids: ['3'],
|
||||
@@ -122,7 +122,7 @@ module('Unit | Model | user', function (hooks) {
|
||||
|
||||
test('it defaults to null for readonly attributes when response does not have fields', async function (assert) {
|
||||
assert.expect(3);
|
||||
this.server.post('/v1/users/123abc:remove-accounts', (schema, request) => {
|
||||
this.server.post('/users/123abc:remove-accounts', (schema, request) => {
|
||||
const body = JSON.parse(request.requestBody);
|
||||
assert.deepEqual(body, {
|
||||
account_ids: ['3'],
|
||||
|
||||
Reference in new issue
Block a user