Skip to content

Commit

Permalink
tests for record-array
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Oct 19, 2016
1 parent f33d0fc commit 95ae791
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit/record-arrays/record-array-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import DS from 'ember-data';

import { module, test } from 'qunit';

let recordArray;

module('unit/record-arrays/record-array - DS.RecordArray', {
beforeEach() {
recordArray = DS.RecordArray.create({ type: 'recordType' });
}
});

test('recordArray.replace() throws error', function(assert) {
assert.throws(function() {
recordArray.replace();
}, Error('The result of a server query (for all recordType types) is immutable. To modify contents, use toArray()'), 'throws error');
});

0 comments on commit 95ae791

Please sign in to comment.