ember-cli-test-helpers
Advanced tools
Comparing version 1.5.2 to 1.6.0-beta.1
{ | ||
"name": "ember-cli-test-helpers", | ||
"version": "1.5.2", | ||
"version": "1.6.0-beta.1", | ||
"description": "A collection of test helpers for ember web applications", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -12,2 +12,8 @@ import Ember from "ember"; | ||
request.method = request.method || "GET"; | ||
if(request.data) { | ||
var contentType = "application/json"; | ||
} else { | ||
var contentType = "application/x-www-form-urlencoded"; | ||
} | ||
request.contentType = request.contentType || contentType; | ||
return request; | ||
@@ -33,9 +39,14 @@ }; | ||
var stubEndpointForHttpRequest = function(url, json, verb, status, post_data) { | ||
var request = { | ||
url: url, | ||
method: verb || "GET", | ||
data: post_data, | ||
cache: false, | ||
contentType: "application/x-www-form-urlencoded" | ||
}; | ||
if(post_data) { | ||
request.contentType = "application/json"; | ||
} | ||
return Ember.$.fauxjax.new({ | ||
request: { | ||
url: url, | ||
method: verb || "GET", | ||
data: post_data, | ||
cache: false | ||
}, | ||
request: request, | ||
response: { | ||
@@ -42,0 +53,0 @@ status: status || 200, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17593
384
2