Skip to content

Commit

Permalink
fixes issue where tests where failing because collection references w…
Browse files Browse the repository at this point in the history
…here point to /Foo and /Bar instead of /Foos and /Bars
  • Loading branch information
Cory D. Wiles committed Jul 9, 2013
1 parent b114958 commit 18cc6c9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ var ff = require('ffef/FatFractal');

exports.cleanup = function() {
var count = 0;
var foos = ff.getArrayFromUri("/Foo");
var foos = ff.getArrayFromUri("/Foos");
if (foos == null) return;

for (var i = 0; i < foos.length; i++) {
ff.deleteObj(foos[i]);
count++;
}
var bars = ff.getArrayFromUri("/Bar");
var bars = ff.getArrayFromUri("/Bars");
if (bars == null) return;

for (var i = 0; i < bars.length; i++) {
Expand All @@ -18,7 +18,7 @@ exports.cleanup = function() {
}
var ffdls = "";
var meta = ff.getAppMetaData();
var keeps = ["/FFUser","/FFUserGroup","/FFNotificationID","/Foo","/Bar","/Baz"];
var keeps = ["/FFUser","/FFUserGroup","/FFNotificationID","/Foos","/Bars","/Baz"];
print ("retrieved metadata " + JSON.stringify(meta));
var colls = meta.collectionResources;
print("colls is: " + JSON.stringify(colls));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ asyncTest("test_100_Public_Access", function() {
console.log("\r\n\t test_100_Public_Access f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(f2));
// verify that the object can be accessed without authentication
var meta = new FFMetaData(f2);
Expand Down Expand Up @@ -153,7 +153,7 @@ asyncTest("test_101_Secure_Access", function() {
console.log("\r\n\t test_101_Secure_Access f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_secure.createObjAtUri(f1, "/Foo", function(f2) {
ff_secure.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_secure.logout();
Expand Down Expand Up @@ -362,7 +362,7 @@ asyncTest("test_106_Local_Backend", function() {
console.log("\r\n\t test_106_Local_Backend f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_local.createObjAtUri(f1, "/Foo", function(f2) {
ff_local.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_local.getObjFromUri(meta.ffUrl, function(f3) {
Expand Down Expand Up @@ -409,7 +409,7 @@ asyncTest("test_107_Multiple_Backends", function() {
console.log("\r\n\t f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_open.getObjFromUri(meta.ffUrl, function(f3) {
Expand All @@ -432,7 +432,7 @@ asyncTest("test_107_Multiple_Backends", function() {
console.log("\r\n\t test_107_Multiple_Backends f4 before save = " +
JSON.stringify(new Foo(f4)));
// create an object to make sure backend is really working
ff_secure.createObjAtUri(f4, "/Foo", function(f5) {
ff_secure.createObjAtUri(f4, "/Foos", function(f5) {
ok(f5 !== null, "f5 is " + JSON.stringify(new Foo(f5)));
var meta2 = new FFMetaData(f5);
ff_secure.getObjFromUri(meta2.ffUrl, function(f6) {
Expand Down Expand Up @@ -526,7 +526,7 @@ asyncTest("test_200_Foo_JSObjClass", function() {
if(showLogs)
console.log("\r\n\t test_200_Foo_JSObjClass f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
if(showLogs)
console.log(
Expand Down Expand Up @@ -601,7 +601,7 @@ asyncTest("test_202_New_Member_Allowed", function() {
console.log(
"\r\n\t test_202_New_Member_Allowed f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2[memb] == memb, "f2 new member is " + memb);
var meta = new FFMetaData(f2);
start();
Expand Down Expand Up @@ -636,7 +636,7 @@ asyncTest("test_203_New_Member_Disallowed", function() {
console.log(
"\r\n\t test_203_New_Member_Disallowed f1 before save = " +
JSON.stringify(f1));
ff_secure.createObjAtUri(f1, "/Foo", function(f2) {
ff_secure.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 == null, "f2 is " + JSON.stringify(f2));
start();
}, function(code, msg) {
Expand Down Expand Up @@ -668,7 +668,7 @@ asyncTest("test_204_Metadata_Provided", function() {
if(showLogs)
console.log("\r\n\t test_204_Metadata_Provided f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
var meta = new FFMetaData(f2);
ok(meta !== null, "metadata is " + JSON.stringify(meta));
start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ var ff = require('ffef/FatFractal');

exports.cleanup = function() {
var count = 0;
var foos = ff.getArrayFromUri("/Foo");
var foos = ff.getArrayFromUri("/Foos");
if (foos == null) return;

for (var i = 0; i < foos.length; i++) {
ff.deleteObj(foos[i]);
count++;
}
var bars = ff.getArrayFromUri("/Bar");
var bars = ff.getArrayFromUri("/Bars");
if (bars == null) return;

for (var i = 0; i < bars.length; i++) {
Expand All @@ -18,7 +18,7 @@ exports.cleanup = function() {
}
var ffdls = "";
var meta = ff.getAppMetaData();
var keeps = ["/FFUser","/FFUserGroup","/FFNotificationID","/Foo","/Bar","/Baz"];
var keeps = ["/FFUser","/FFUserGroup","/FFNotificationID","/Foos","/Bars","/Baz"];
print ("retrieved metadata " + JSON.stringify(meta));
var colls = meta.collectionResources;
print("colls is: " + JSON.stringify(colls));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ asyncTest("test_100_Public_Access", function() {
console.log("\r\n\t test_100_Public_Access f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(f2));
// verify that the object can be accessed without authentication
var meta = new FFMetaData(f2);
Expand Down Expand Up @@ -153,7 +153,7 @@ asyncTest("test_101_Secure_Access", function() {
console.log("\r\n\t test_101_Secure_Access f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_secure.createObjAtUri(f1, "/Foo", function(f2) {
ff_secure.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_secure.logout();
Expand Down Expand Up @@ -362,7 +362,7 @@ asyncTest("test_106_Local_Backend", function() {
console.log("\r\n\t test_106_Local_Backend f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_local.createObjAtUri(f1, "/Foo", function(f2) {
ff_local.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_local.getObjFromUri(meta.ffUrl, function(f3) {
Expand Down Expand Up @@ -409,7 +409,7 @@ asyncTest("test_107_Multiple_Backends", function() {
console.log("\r\n\t f1 before save = " +
JSON.stringify(f1));
// create an object to make sure backend is really working
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
var meta = new FFMetaData(f2);
ff_open.getObjFromUri(meta.ffUrl, function(f3) {
Expand All @@ -432,7 +432,7 @@ asyncTest("test_107_Multiple_Backends", function() {
console.log("\r\n\t test_107_Multiple_Backends f4 before save = " +
JSON.stringify(new Foo(f4)));
// create an object to make sure backend is really working
ff_secure.createObjAtUri(f4, "/Foo", function(f5) {
ff_secure.createObjAtUri(f4, "/Foos", function(f5) {
ok(f5 !== null, "f5 is " + JSON.stringify(new Foo(f5)));
var meta2 = new FFMetaData(f5);
ff_secure.getObjFromUri(meta2.ffUrl, function(f6) {
Expand Down Expand Up @@ -526,7 +526,7 @@ asyncTest("test_200_Foo_ObjCClass", function() {
if(showLogs)
console.log("\r\n\t test_200_Foo_ObjCClass f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(new Foo(f2)));
if(showLogs)
console.log(
Expand Down Expand Up @@ -566,7 +566,7 @@ asyncTest("test_201_Foo_Schemaless", function() {
if(showLogs)
console.log("\r\n\t test_201_Foo_Schemaless f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 !== null, "f2 is " + JSON.stringify(f2));
var meta = new FFMetaData(f2);
start();
Expand Down Expand Up @@ -601,7 +601,7 @@ asyncTest("test_204_New_Member_Allowed", function() {
console.log(
"\r\n\t test_204_New_Member_Allowed f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2[memb] == memb, "f2 new member is " + memb);
var meta = new FFMetaData(f2);
start();
Expand Down Expand Up @@ -636,7 +636,7 @@ asyncTest("test_205_New_Member_Disallowed", function() {
console.log(
"\r\n\t test_205_New_Member_Disallowed f1 before save = " +
JSON.stringify(f1));
ff_secure.createObjAtUri(f1, "/Foo", function(f2) {
ff_secure.createObjAtUri(f1, "/Foos", function(f2) {
ok(f2 == null, "f2 is " + JSON.stringify(f2));
start();
}, function(code, msg) {
Expand Down Expand Up @@ -668,7 +668,7 @@ asyncTest("test_206_Metadata_Provided", function() {
if(showLogs)
console.log("\r\n\t test_200_Foo_ObjCClass f1 before save = " +
JSON.stringify(f1));
ff_open.createObjAtUri(f1, "/Foo", function(f2) {
ff_open.createObjAtUri(f1, "/Foos", function(f2) {
var meta = new FFMetaData(f2);
ok(meta !== null, "metadata is " + JSON.stringify(meta));
start();
Expand Down

0 comments on commit 18cc6c9

Please sign in to comment.