(id, cb)
| 1206 | } |
| 1207 | |
| 1208 | function assertChangeRecordedForId(id, cb) { |
| 1209 | SourceModel.getChangeModel().getCheckpointModel() |
| 1210 | .current(function(err, cp) { |
| 1211 | if (err) return cb(err); |
| 1212 | |
| 1213 | SourceModel.changes(cp - 1, {}, function(err, pendingChanges) { |
| 1214 | if (err) return cb(err); |
| 1215 | |
| 1216 | expect(pendingChanges, 'list of changes').to.have.length(1); |
| 1217 | const change = pendingChanges[0].toObject(); |
| 1218 | expect(change).to.have.property('checkpoint', cp); // sanity check |
| 1219 | expect(change).to.have.property('modelName', SourceModel.modelName); |
| 1220 | // NOTE(bajtos) Change.modelId is always String |
| 1221 | // regardless of the type of the changed model's id property |
| 1222 | expect(change).to.have.property('modelId', '' + id); |
| 1223 | |
| 1224 | cb(); |
| 1225 | }); |
| 1226 | }); |
| 1227 | } |
| 1228 | }); |
| 1229 | |
| 1230 | describe('complex setup', function() { |
no outgoing calls
no test coverage detected
searching dependent graphs…