Created
September 4, 2015 14:28
-
-
Save richmolj/f3648c66db3c070c0f4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`import { moduleFor, test } from 'ember-qunit'` | |
moduleFor 'serializer:application', 'Unit | Serializer | application', | |
needs: [] | |
beforeEach: -> | |
@TestModel = DS.Model.extend | |
name: DS.attr('string') | |
updatedAt: DS.attr('date') | |
test 'it removes updated_at when saving', (assert) -> | |
serializer = @subject() | |
internalModel = new DS.InternalModel(@TestModel, null, @container, {}) | |
snapshot = new DS.Snapshot(internalModel) | |
serializedRecord = serializer.serialize(snapshot) | |
assert.notOk serializedRecord.data.attributes.hasOwnProperty('updated_at') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment