Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security issues, update ember-fetch and move to deps #19

Merged
merged 2 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"ember-auto-import": "^1.6.0",
"ember-cli-babel": "^7.22.1",
"ember-cli-htmlbars": "^5.3.1",
"ember-fetch": "^8.0.2",
"jquery-param": "^1.1.3"
},
"devDependencies": {
Expand All @@ -41,7 +42,7 @@
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~3.22.0",
"ember-cli-addon-docs": "^0.10.0",
"ember-cli-addon-docs-yuidoc": "^0.2.4",
"ember-cli-addon-docs-yuidoc": "^1.0.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^2.0.0",
Expand All @@ -50,9 +51,9 @@
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.0",
"ember-data": "^3.22.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^7.1.0",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^4.6.0",
Expand Down
18 changes: 9 additions & 9 deletions tests/unit/mixins/fetch-request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('is set if the URL matches the host', function(assert) {
this.server.get('http://example.com/test', req => {
const { requestHeaders } = req;
assert.equal(requestHeaders['content-type'], 'application/json');
assert.equal(requestHeaders['other-key'], 'Other Value');
assert.equal(requestHeaders['Content-Type'], 'application/json');
assert.equal(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand All @@ -524,8 +524,8 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('is set if the URL is relative', function(assert) {
this.server.get('/some/relative/url', req => {
const { requestHeaders } = req;
assert.equal(requestHeaders['content-type'], 'application/json');
assert.equal(requestHeaders['other-key'], 'Other Value');
assert.equal(requestHeaders['Content-Type'], 'application/json');
assert.equal(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand All @@ -543,7 +543,7 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('is set if the URL matches one of the RegExp trustedHosts', function(assert) {
this.server.get('http://my.example.com', req => {
const { requestHeaders } = req;
assert.equal(requestHeaders['other-key'], 'Other Value');
assert.equal(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand All @@ -563,7 +563,7 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('is set if the URL matches one of the string trustedHosts', function(assert) {
this.server.get('http://foo.bar.com', req => {
const { requestHeaders } = req;
assert.equal(requestHeaders['other-key'], 'Other Value');
assert.equal(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand All @@ -583,7 +583,7 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('is not set if the URL does not match the host', function(assert) {
this.server.get('http://example.com', req => {
const { requestHeaders } = req;
assert.notEqual(requestHeaders['other-key'], 'Other Value');
assert.notEqual(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand All @@ -602,8 +602,8 @@ module('Unit | Mixin | fetch-request', function(hooks) {
test('can be supplied on a per-request basis', function(assert) {
this.server.get('http://example.com', req => {
const { requestHeaders } = req;
assert.equal(requestHeaders['per-request-key'], 'Some value');
assert.equal(requestHeaders['other-key'], 'Other Value');
assert.equal(requestHeaders['Per-Request-Key'], 'Some value');
assert.equal(requestHeaders['Other-key'], 'Other Value');
return jsonResponse();
});

Expand Down
Loading