Initial test suite for plugins

Change-Id: Ibc5c52ea1fd69481e02486db2ff7fb4c5afa8b99
diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
new file mode 100644
index 0000000..fa74486
--- /dev/null
+++ b/dev/js/spec/pluginSpec.js
@@ -0,0 +1,28 @@
+define(['plugin/server','plugin/widget'], function (pluginServerClass, widgetClass) {
+
+  describe('KorAP.Plugin.Server', function () {
+
+    it('should be initializable', function () {
+      var manager = pluginServerClass.create();
+      expect(manager).toBeTruthy();
+      manager.destroy();
+    });
+
+    it('should add a widget', function () {
+      var manager = pluginServerClass.create();
+      var div = document.createElement("div");
+      var id = manager.addWidget(div, 'about:blank');
+      expect(id).toMatch(/^id-/);
+      expect(div.firstChild.tagName).toEqual("IFRAME");
+      manager.destroy();
+    });
+  });
+
+  describe('KorAP.Plugin.Widget', function () {
+    it('should be initializable', function () {
+      var widget = widgetClass.create();
+      expect(widget).toBeTruthy();
+    });
+  });
+
+});