]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#233] guid needs to be more unique; unit test revision
authorRick Waldron <waldron.rick@gmail.com>
Sun, 19 Dec 2010 20:51:53 +0000 (15:51 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Sun, 19 Dec 2010 20:51:53 +0000 (15:51 -0500)
test/popcorn.unit.js

index ad476415d956cd432c04ca44ea89e760363a0ed5..0adcf981afa9ce21e63a71d76ac464e4b9bb2e9a 100644 (file)
@@ -58,7 +58,7 @@ test("Utility", function () {
 
 test("guid", function () {
   
-  expect(10);
+  expect(6);
   
   var count = 3, 
       guids = [], 
@@ -68,10 +68,10 @@ test("guid", function () {
     
     temp = Popcorn.guid();
     
-    ok( temp, "Popcorn.guid() returns value" );
-    
     if ( i > 0 ) {
       notEqual( temp, guids[ guids.length - 1 ], "Current guid does not equal last guid" );
+    } else {
+      ok( temp, "Popcorn.guid() returns value" );
     }
     
     guids.push(temp);
@@ -83,10 +83,10 @@ test("guid", function () {
     
     temp = Popcorn.guid( "pre" );
     
-    ok( temp, "Popcorn.guid( 'pre' ) returns value" );
-    
     if ( i > 0 ) {
       notEqual( temp, guids[ guids.length - 1 ], "Current guid does not equal last guid" );
+    } else {
+      ok( temp, "Popcorn.guid( 'pre' ) returns value" );
     }
     
     guids.push(temp);