(hoofbeats)(unittests) Uses 'var' and removes unneeded test.
authorSalvatore Iovene <salvatore@iovene.com>
Tue, 5 Feb 2013 10:36:06 +0000 (12:36 +0200)
committerSalvatore Iovene <salvatore@iovene.com>
Tue, 5 Feb 2013 10:36:06 +0000 (12:36 +0200)
examples/hoofbeats/tests/unit/library.js

index d817b89..4b7df91 100644 (file)
@@ -10,7 +10,7 @@ $(function() {
 
     test("scan when browser doesn't support Tizen web api",
     function() {
-        lib = new HoofbeatsLibrary();
+        var lib = new HoofbeatsLibrary();
         window.tizen = undefined;
         raises(function() {
             lib.scan();
@@ -18,13 +18,7 @@ $(function() {
     });
 
     test("successful scan", function() {
-        lib = new HoofbeatsLibrary();
-        lib.scan();
-        ok(lib.mediaItems.length > 0, "there are items in the library");
-    });
-
-    test("successful scan with promise", function() {
-        lib = new HoofbeatsLibrary();
+        var lib = new HoofbeatsLibrary();
                stop();
         lib.scan().then(function() {
                        ok(lib.mediaItems.length > 0, "there are items in the library");