Commit 6fe8110

mo khan <mo@mokhan.ca>
2016-12-17 18:09:06
start to write tests for boot.
1 parent ed58f1f
Changed files (1)
app/boot/__tests__/wire-up-components-into_spec.js
@@ -0,0 +1,22 @@
+import WireUpComponentsInto from '../wire-up-components-into';
+import Registry from '../../infrastructure/registry';
+
+describe("WireUpComponentsInto", () => {
+  let subject = null;
+  let registry = null;
+
+  beforeEach(() => {
+    registry = new Registry();
+    subject = new WireUpComponentsInto(registry);
+  });
+
+  describe("#run", () => {
+    it ("registers each command", function() {
+      subject.run()
+
+      results = registry.resolveAll('command')
+      expect(results.length).toEqual(1)
+      expect(results[0]).toBeInstanceOf(LoginCommand);
+    });
+  });
+})