Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 5360982

Browse files
author
vikasrohit
committed
Merge pull request #685 from appirio-tech/feature/vikas-submission-font-directives-ut-fix
Trying to fix the unit tests error appearing in qa-merge branch.
2 parents 0dfd60e + 2f76a06 commit 5360982

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/directives/tc-form-fonts/tc-form-fonts.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ describe('Topcoder Form Fonts Directive', function() {
66
bard.appModule('topcoder');
77
bard.inject(this, '$compile', '$rootScope');
88
scope = $rootScope.$new();
9+
scope.formFonts = [];
910

10-
var form = angular.element('<form><tc-form-fonts /></form>');
11+
var form = angular.element('<form><tc-form-fonts form-fonts="formFonts" /></form>');
1112
element = form.find('tc-form-fonts');
1213
var formElement = $compile(form)(scope);
1314
scope.$digest();
@@ -23,7 +24,7 @@ describe('Topcoder Form Fonts Directive', function() {
2324

2425
describe('is initialized with', function() {
2526
it('empty font data', function() {
26-
defaultFormFont = isolateScope.formFonts[0];
27+
var defaultFormFont = isolateScope.formFonts[0];
2728

2829
expect(defaultFormFont.id).to.equal(0);
2930
expect(defaultFormFont.source).to.equal('');

app/directives/tc-form-stockart/tc-form-stockart.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ describe('Topcoder Form Stockart Directive', function() {
66
bard.appModule('topcoder');
77
bard.inject(this, '$compile', '$rootScope');
88
scope = $rootScope.$new();
9+
scope.stockarts = [];
910

10-
var form = angular.element('<form><tc-form-stockart /></form>');
11+
var form = angular.element('<form><tc-form-stockart form-stockarts="stockarts" /></form>');
1112
element = form.find('tc-form-stockart');
1213
var formElement = $compile(form)(scope);
1314
scope.$digest();

0 commit comments

Comments
 (0)