Skip to content

Commit

Permalink
Fixing some deprecations, adding deprecatedTest
Browse files Browse the repository at this point in the history
  • Loading branch information
pliljegr committed Aug 31, 2019
1 parent 7d53394 commit cdad881
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 193 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Store, {
setIdentifierResetMethod,
setIdentifierForgetMethod,
} from '@ember-data/store';
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import JSONAPISerializer from '@ember-data/serializer/json-api';
import Model, { attr, belongsTo } from '@ember-data/model';
import Adapter from '@ember-data/adapter';
import Serializer from '@ember-data/serializer';
Expand All @@ -27,6 +29,9 @@ if (IDENTIFIERS) {
hooks.beforeEach(function() {
const { owner } = this;

owner.register('adapter:application', JSONAPIAdapter.extend());
owner.register('serializer:application', JSONAPISerializer.extend());

class User extends Model {
@attr() firstName: string;
@attr() username: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { get } from '@ember/object';
import { setupTest } from 'ember-qunit';
import Model from 'ember-data/model';
import Store from 'ember-data/store';
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import JSONAPISerializer from '@ember-data/serializer/json-api';
import { module, test } from 'qunit';
import { settled } from '@ember/test-helpers';
import EmberObject from '@ember/object';
Expand Down Expand Up @@ -136,6 +138,8 @@ module('integration/record-data - Custom RecordData Implementations', function(h
owner.register('model:person', Person);
owner.register('model:house', House);
owner.register('service:store', CustomStore);
owner.register('adapter:application', JSONAPIAdapter.extend());
owner.register('serializer:application', JSONAPISerializer.extend());
});

test('A RecordData implementation that has the required spec methods should not error out', async function(assert) {
Expand Down
Loading

0 comments on commit cdad881

Please sign in to comment.