Skip to content

Commit 21e8822

Browse files
cibernoxpixelhandler
authored andcommitted
Remove deprecated Ember.K (#132)
* Remove deprecated `Ember.K`
1 parent fefc223 commit 21e8822

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tests/unit/adapters/application-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ test('#fetch handles 204 (Success, no content) response status w/o calling deser
922922
sandbox.stub(adapter, 'fetchUrl', function () {});
923923
mockFetchJax(sandbox, adapter, '');
924924
sandbox.stub(adapter, 'cacheResource', function () {});
925-
adapter.serializer = {deserialize: sandbox.spy(), deserializeIncluded: Ember.K};
925+
adapter.serializer = {deserialize: sandbox.spy(), deserializeIncluded() {}};
926926
let promise = adapter.fetch('/posts', {method: 'PATCH', body: '{"data": null}'});
927927

928928
assert.ok(typeof promise.then === 'function', 'returns a thenable');
@@ -940,7 +940,7 @@ test('#fetch handles 200 (Success) response status', function(assert) {
940940
const adapter = this.subject({type: 'posts', url: '/posts'});
941941
mockFetchJax(sandbox, adapter, postMock);
942942
sandbox.stub(adapter, 'cacheResource', function () {});
943-
adapter.serializer = { deserialize: sandbox.spy(), deserializeIncluded: Ember.K };
943+
adapter.serializer = { deserialize: sandbox.spy(), deserializeIncluded() {} };
944944
let promise = adapter.fetch('/posts/1', { method: 'GET' });
945945

946946
assert.ok(typeof promise.then === 'function', 'returns a thenable');

tests/unit/mixins/resource-operations-test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Ember from 'ember';
21
import RSVP from 'rsvp';
32
// import ResourceOperationsMixin from 'ember-jsonapi-resources/mixins/resource-operations';
43
import { module, test } from 'qunit';
@@ -20,12 +19,12 @@ module('Unit | Mixin | resource-operations', {
2019
createRelationship: this.sandbox.spy(promiseResolved),
2120
patchRelationship: this.sandbox.spy(promiseResolved),
2221
deleteRelationship: this.sandbox.spy(promiseResolved),
23-
trigger: Ember.K
22+
trigger() {}
2423
},
2524
name: attr('string'),
2625
// mock relationship computed properties
27-
guns: {kind: 'toMany', mapBy: Ember.K }, // toMany('guns')
28-
horse: {kind: 'toOne', get: Ember.K } // toOne('horse')
26+
guns: {kind: 'toMany', mapBy() {} }, // toMany('guns')
27+
horse: {kind: 'toOne', get() {} } // toOne('horse')
2928
});
3029
this.subject = Cowboy.create({ id: 1, name:'Lone Ranger'});
3130
// mock payload setup

0 commit comments

Comments
 (0)