Skip to content

Commit

Permalink
[test minor] Change assert.length to assert.lengthOf
Browse files Browse the repository at this point in the history
`vows@0.5.12` changes syntax from `assert.length` to `assert.lengthOf`.
  • Loading branch information
mmalecki committed Nov 8, 2011
1 parent a74bf38 commit cce6eca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/container-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files": function (err, files) {
assert.isArray(files);
assert.length(files, 1);
assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
assert.length(testData.container.files, 1);
assert.lengthOf(testData.container.files, 1);
}
}
}
Expand All @@ -152,9 +152,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
assert.length(files, 1);
assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
assert.length(testData.container.files, 1);
assert.lengthOf(testData.container.files, 1);
assert.isNotNull(files[0].local);
}
}
Expand All @@ -169,9 +169,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
assert.length(files, 1);
assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
assert.length(testData.container.files, 1);
assert.lengthOf(testData.container.files, 1);
assert.isTrue(/^file/.test(files[0].name));
}
}
Expand All @@ -186,9 +186,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a empty list": function (err, files) {
assert.isArray(files);
assert.length(files, 0);
assert.lengthOf(files, 0);
assert.isArray(testData.container.files);
assert.length(testData.container.files, 0);
assert.lengthOf(testData.container.files, 0);
}
}
}
Expand All @@ -202,9 +202,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
assert.length(files, 1);
assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
assert.length(testData.container.files, 1);
assert.lengthOf(testData.container.files, 1);
assert.equal(files[0].name, 'file1.txt');
}
}
Expand All @@ -219,7 +219,7 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a error": function (err, files) {
assert.isArray(err);
assert.length(err, 1);
assert.lengthOf(err, 1);
assert.instanceOf(err[0], Error);
}
}
Expand Down

0 comments on commit cce6eca

Please sign in to comment.