From 0461b3a429f28e6fddf978c7c0ec2498b0bab14b Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 30 Aug 2017 16:05:34 +0200 Subject: [PATCH] vnClientCard unit test --- client/client/src/card/card.spec.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 client/client/src/card/card.spec.js diff --git a/client/client/src/card/card.spec.js b/client/client/src/card/card.spec.js new file mode 100644 index 000000000..da1b4ea45 --- /dev/null +++ b/client/client/src/card/card.spec.js @@ -0,0 +1,21 @@ +import './card.js'; + +describe('Component vnClientCard', () => { + let $componentController; + let $scope; + + beforeEach(() => { + angular.mock.module('client'); + }); + + beforeEach(angular.mock.inject(function(_$componentController_, $rootScope) { + $componentController = _$componentController_; + $scope = $scope; + })); + + it('should define and set client property to null in the module instance', () => { + let controller = $componentController('vnClientCard', {$scope: $scope}); + expect(controller.client).toBeDefined(); + expect(controller.client).toBe(null); + }); +});