refactor: Refactor seralizeScopeID from models to serializers

This commit is contained in:
Susmitha Girumala committed 2020-09-21 18:23:32 -04:00
1 parent 1a565f9097
commit 0a1eafe55e
11 files changed
+63 -30

No files matched your search

@@ -62,7 +62,7 @@ module('Unit | Serializer | application', function (hooks) {
},
});
const snapshot = record._createSnapshot();
snapshot.record.serializeScopeID = false;
serializer.serializeScopeID = false;
const serializedRecord = serializer.serialize(snapshot);
assert.deepEqual(serializedRecord, {
name: 'User',
@@ -0,0 +1,23 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Serializer | host', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let store = this.owner.lookup('service:store');
let serializer = store.serializerFor('host');
assert.ok(serializer);
});
test('it serializes records', function(assert) {
let store = this.owner.lookup('service:store');
let record = store.createRecord('host', {});
let serializedRecord = record.serialize();
assert.ok(serializedRecord);
});
});