1
0
Fork 0

added a test for rotate()

This commit is contained in:
Jan Steemann 2013-06-12 13:09:46 +02:00
parent e294d1b8c4
commit 68c3b02ffb
1 changed files with 31 additions and 0 deletions

View File

@ -609,6 +609,37 @@ function CollectionSuite () {
db._drop(cn);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief rotate
////////////////////////////////////////////////////////////////////////////////
testRotate : function () {
var cn = "example";
db._drop(cn);
var c1 = db._create(cn);
c1.save({ _key: "test" });
var f = c1.figures();
assertEqual(0, f.datafiles.count);
if (c1.rotate) {
// rotate() is only present server-side...
c1.rotate();
f = c1.figures();
assertEqual(1, f.datafiles.count);
c1.rotate();
f = c1.figures();
assertEqual(2, f.datafiles.count);
}
c1.unload();
db._drop(cn);
},
////////////////////////////////////////////////////////////////////////////////
/// @brief figures
////////////////////////////////////////////////////////////////////////////////