feat: 🎸 Add create worker page (#1244)
* feat: 🎸 Add create worker page ✅ Closes: ICU-5246
This commit is contained in:
1 parent
dd0d37241c
commit
3130831ae0
20 files changed
+507
-66
No files matched your search
@@ -23,12 +23,17 @@ module('Unit | Serializer | worker', function (hooks) {
|
||||
});
|
||||
|
||||
test('it serializes using `adapterOptions.workerGeneratedAuthToken`', function (assert) {
|
||||
const scopeId = 'global';
|
||||
const store = this.owner.lookup('service:store');
|
||||
const serializer = store.serializerFor('worker');
|
||||
const record = store.createRecord('worker', {
|
||||
name: 'worker',
|
||||
description: 'Description',
|
||||
version: 1,
|
||||
scope: {
|
||||
scope_id: scopeId,
|
||||
type: 'global',
|
||||
},
|
||||
});
|
||||
const snapshot = record._createSnapshot();
|
||||
snapshot.adapterOptions = {
|
||||
@@ -36,7 +41,7 @@ module('Unit | Serializer | worker', function (hooks) {
|
||||
};
|
||||
const serializedRecord = serializer.serialize(snapshot);
|
||||
assert.deepEqual(serializedRecord, {
|
||||
version: 1,
|
||||
scope_id: scopeId,
|
||||
worker_generated_auth_token: '123-abc',
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user