diff --git a/packages/-ember-data/tests/integration/adapter/handle-response-test.js b/packages/-ember-data/tests/integration/adapter/handle-response-test.js index c9a956a5f6a..c08b60f2ae1 100644 --- a/packages/-ember-data/tests/integration/adapter/handle-response-test.js +++ b/packages/-ember-data/tests/integration/adapter/handle-response-test.js @@ -34,14 +34,14 @@ module('integration/adapter/handle-response', function (hooks) { let samplePayload = { data: [ { - id: 1, + id: '1', type: 'person', attributes: { name: 'John Smith', }, }, { - id: 2, + id: '2', type: 'person', attributes: { name: 'Zhang San', @@ -51,7 +51,7 @@ module('integration/adapter/handle-response', function (hooks) { }; this.server.get('/people', function () { - return [200, { 'Content-Type': 'application/json' }, JSON.stringify(samplePayload)]; + return ['200', { 'Content-Type': 'application/json' }, JSON.stringify(samplePayload)]; }); class TestAdapter extends JSONAPIAdapter { @@ -66,7 +66,7 @@ module('integration/adapter/handle-response', function (hooks) { await this.store.findAll('person'); - assert.equal(handleResponseCalled, 1, 'handle response is called'); + assert.strictEqual(handleResponseCalled, 1, 'handle response is called'); }); test('handleResponse is called with empty array response', async function (assert) { @@ -77,7 +77,7 @@ module('integration/adapter/handle-response', function (hooks) { }; this.server.get('/people', function () { - return [200, { 'Content-Type': 'application/json' }, JSON.stringify(samplePayload)]; + return ['200', { 'Content-Type': 'application/json' }, JSON.stringify(samplePayload)]; }); class TestAdapter extends JSONAPIAdapter { @@ -92,14 +92,14 @@ module('integration/adapter/handle-response', function (hooks) { await this.store.findAll('person'); - assert.equal(handleResponseCalled, 1, 'handle response is called'); + assert.strictEqual(handleResponseCalled, 1, 'handle response is called'); }); test('handleResponse is called on empty string response', async function (assert) { let handleResponseCalled = 0; this.server.get('/people', function () { - return [200, { 'Content-Type': 'application/json' }, '']; + return ['200', { 'Content-Type': 'application/json' }, '']; }); class TestAdapter extends JSONAPIAdapter { @@ -119,14 +119,14 @@ module('integration/adapter/handle-response', function (hooks) { assert.ok(true, 'promise rejected'); } - assert.equal(handleResponseCalled, 1, 'handle response is called'); + assert.strictEqual(handleResponseCalled, 1, 'handle response is called'); }); test('handleResponse is not called on invalid response', async function (assert) { let handleResponseCalled = 0; this.server.get('/people', function () { - return [200, { 'Content-Type': 'application/json' }, 'bogus response']; + return ['200', { 'Content-Type': 'application/json' }, 'bogus response']; }); class TestAdapter extends JSONAPIAdapter { @@ -146,14 +146,14 @@ module('integration/adapter/handle-response', function (hooks) { assert.ok(true, 'promise rejected'); } - assert.equal(handleResponseCalled, 0, 'handle response is not called'); + assert.strictEqual(handleResponseCalled, 0, 'handle response is not called'); }); test('handleResponse is called on empty string response with 400 status', async function (assert) { let handleResponseCalled = 0; this.server.get('/people', function () { - return [400, { 'Content-Type': 'application/json' }, '']; + return ['400', { 'Content-Type': 'application/json' }, '']; }); class TestAdapter extends JSONAPIAdapter { @@ -173,7 +173,7 @@ module('integration/adapter/handle-response', function (hooks) { assert.ok(true, 'promise rejected'); } - assert.equal(handleResponseCalled, 1, 'handle response is called'); + assert.strictEqual(handleResponseCalled, 1, 'handle response is called'); }); test('handleResponse is called with correct parameters on string response with 422 status', async function (assert) { @@ -182,7 +182,7 @@ module('integration/adapter/handle-response', function (hooks) { let errorObject = { errors: {} }; this.server.get('/people', function () { - return [422, { 'Content-Type': 'application/json' }, JSON.stringify(errorObject)]; + return ['422', { 'Content-Type': 'application/json' }, JSON.stringify(errorObject)]; }); class TestAdapter extends JSONAPIAdapter { @@ -203,6 +203,6 @@ module('integration/adapter/handle-response', function (hooks) { assert.ok(true, 'promise rejected'); } - assert.equal(handleResponseCalled, 1, 'handle response is called'); + assert.strictEqual(handleResponseCalled, 1, 'handle response is called'); }); });