ember-promise
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -7,3 +7,3 @@ import Ember from 'ember'; | ||
hash.url = url; | ||
hash.type = type; | ||
hash.type = type || "GET"; | ||
hash.dataType = "json"; | ||
@@ -10,0 +10,0 @@ hash.cache = false; |
{ | ||
"name": "ember-promise", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A simple promise object that will wrap xhr resolve/reject with an ember.run", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -10,2 +10,4 @@ import Ember from "ember"; | ||
App = startApp(); | ||
var people = [{id: 1, firstName: 'toran', lastName: 'billups'}, {id: 2, firstName: 'brandon', lastName: 'williams'}]; | ||
$.fauxjax.new({type: "GET", url: "/api/people", dataType: 'json', responseText: people}); | ||
}, | ||
@@ -18,4 +20,2 @@ teardown: function() { | ||
test("GET requests will resolve correctly", function() { | ||
var people = [{id: 1, firstName: 'toran', lastName: 'billups'}, {id: 2, firstName: 'brandon', lastName: 'williams'}]; | ||
$.fauxjax.new({type: "GET", url: "/api/people", dataType: 'json', responseText: people}); | ||
visit("/"); | ||
@@ -31,1 +31,13 @@ andThen(function() { | ||
}); | ||
test("GET request will be the default type if not specified", function() { | ||
visit("/default"); | ||
andThen(function() { | ||
var rows = find(".name"); | ||
equal(rows.length, 2); | ||
var first = find(".name:eq(0)").text(); | ||
equal(first, "toran"); | ||
var last = find(".name:eq(1)").text(); | ||
equal(last, "brandon"); | ||
}); | ||
}); |
@@ -10,4 +10,5 @@ import Ember from 'ember'; | ||
this.route("people", { path: "/" }); | ||
this.route("default", { path: "/default" }); | ||
}); | ||
export default Router; |
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
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
16620
45
242