unittests/tests/widget.js
branchpopcorn-port
changeset 74 d7a7d7216371
child 114 eda061f1aa75
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unittests/tests/widget.js	Thu Oct 13 17:12:52 2011 +0200
@@ -0,0 +1,19 @@
+/* test module for base widgets */
+function test_widget() {
+  module("Base widget testing", 
+  {setup : function() {
+    this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4");
+    
+    this.dt = new IriSP.DataLoader();
+    this.ser = new IriSP.JSONSerializer(this.dt, "/url");
+  } }
+  );
+  
+  test("test initialisation", function() {
+    var wid = new IriSP.Widget(this.Popcorn, {parent: "widget-div"}, this.ser);
+    deepEqual(wid._config, {parent: "widget-div"}, "Check if the parent div is set correctly");
+    
+  });
+  
+  
+};
\ No newline at end of file