Files
threshold-ui/addons/api/tests/unit/serializers/fragment-managed-groups-attributes-test.js
T
Carlos Alcaide Corvo 2620607cc3 feat: 🎸 Finish fragment serializer and tests
Finish fragment serializer and refactor the tests of the model to
accomadate the change.
2021-11-05 08:55:37 -07:00

22 lines
590 B
JavaScript

import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module(
'Unit | Serializer | fragment managed groups attributes',
function (hooks) {
setupTest(hooks);
test('it serializes empty string to null', function (assert) {
assert.expect(1);
const store = this.owner.lookup('service:store');
const record = store.createRecord('fragment-managed-groups-attributes', {
filter: '',
});
const serializedRecord = record.serialize();
assert.deepEqual(serializedRecord, {
filter: null,
});
});
}
);