can-fixture
Advanced tools
Comparing version 0.4.0-pre.10 to 0.4.0-pre.11
{ | ||
"name": "can-fixture", | ||
"version": "0.4.0-pre.10", | ||
"version": "0.4.0-pre.11", | ||
"description": "Intercept AJAX requests and simulate responses.", | ||
@@ -20,4 +20,4 @@ "main": "fixture.js", | ||
"dependencies": { | ||
"can-connect": "^0.6.0-pre.13", | ||
"can-set": "^0.6.0-pre.6", | ||
"can-connect": "^0.6.0-pre.15", | ||
"can-set": "^0.6.0-pre.8", | ||
"can-util": "^3.0.0-pre.12" | ||
@@ -24,0 +24,0 @@ }, |
@@ -361,3 +361,2 @@ var QUnit = require('steal-qunit'); | ||
function errorAndStart(e){ | ||
debugger; | ||
ok(false, "borked"+e); | ||
@@ -709,3 +708,3 @@ start(); | ||
test("filtering works", function() { | ||
var next; | ||
var store = fixture.store( | ||
@@ -735,3 +734,3 @@ [ { state : 'CA', name : 'Casadina' }, | ||
function next(){ | ||
next = function (){ | ||
@@ -779,6 +778,5 @@ var store =fixture.store([{ | ||
ok(false); | ||
debugger; | ||
start(); | ||
}); | ||
} | ||
}; | ||
function last(){ | ||
@@ -1561,1 +1559,37 @@ var store =fixture.store([{ | ||
}); | ||
test("set.Algebra stores provide a count (#58)", function(){ | ||
var algebra = new set.Algebra( | ||
new set.Translate("where","where"), | ||
set.props.id("_id"), | ||
set.props.sort('orderBy'), | ||
set.props.enum("type", ["used","new","certified"]), | ||
set.props.rangeInclusive("start","end") | ||
); | ||
var store = fixture.store([ | ||
{_id: 1, modelId: 1, year: 2013, name: "2013 Mustang", type: "used"}, | ||
{_id: 2, modelId: 1, year: 2014, name: "2014 Mustang", type: "new"}, | ||
{_id: 3, modelId: 2, year: 2013, name: "2013 Focus", type: "used"}, | ||
{_id: 4, modelId: 2, year: 2014, name: "2014 Focus", type: "certified"}, | ||
{_id: 5, modelId: 3, year: 2013, name: "2013 Altima", type: "used"}, | ||
{_id: 6, modelId: 3, year: 2014, name: "2014 Altima", type: "certified"}, | ||
{_id: 7, modelId: 4, year: 2013, name: "2013 Leaf", type: "used"}, | ||
{_id: 8, modelId: 4, year: 2014, name: "2014 Leaf", type: "used"} | ||
], algebra); | ||
fixture('/cars/{_id}', store); | ||
stop(); | ||
$.ajax({ url: "/cars", dataType: "json", data: {start: 2, end: 3} }).then(function(carsData) { | ||
equal(carsData.data.length, 2, 'Got 2 cars'); | ||
equal(carsData.count, 8, "got the count"); | ||
QUnit.start(); | ||
}, function(){ | ||
QUnit.ok(false, "borked"); | ||
QUnit.start(); | ||
}); | ||
}); |
129345
2495
Updatedcan-connect@^0.6.0-pre.15
Updatedcan-set@^0.6.0-pre.8