| author | ymh <ymh.work@gmail.com> |
| Sat, 06 Aug 2016 21:29:33 +0700 | |
| changeset 261 | 02e2396bcbbc |
| parent 245 | c9dd78a43b07 |
| permissions | -rw-r--r-- |
|
245
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
1 |
import { moduleForModel, test } from 'ember-qunit'; |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
2 |
|
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
3 |
moduleForModel('transcript', 'Unit | Serializer | transcript', { |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
4 |
// Specify the other units that are required for this test. |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
5 |
needs: ['serializer:transcript'] |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
6 |
}); |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
7 |
|
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
8 |
// Replace this with your real tests. |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
9 |
test('it serializes records', function(assert) { |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
10 |
let record = this.subject(); |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
11 |
|
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
12 |
let serializedRecord = record.serialize(); |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
13 |
|
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
14 |
assert.ok(serializedRecord); |
|
c9dd78a43b07
Transcript model and erializer
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
15 |
}); |