Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Commit 063762b

Browse files
Nishad BakshiNishad Bakshi
authored andcommitted
beautified and fixed test code to work with bindings
1 parent b1a9688 commit 063762b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

app/templates/ui/app/detail/detail.controller.spec.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* jshint -W117, -W030 */
2-
(function () {
2+
(function() {
33
'use strict';
44

5-
describe('Controller: DetailCtrl', function () {
5+
describe('Controller: DetailCtrl', function() {
66

77
var controller;
88
var doc;
@@ -12,20 +12,24 @@
1212
bard.inject('$controller', '$rootScope');
1313
});
1414

15-
beforeEach(function () {
15+
beforeEach(function() {
1616
// stub the document
17-
var headers = function() { return 'application/json'; };
17+
var headers = function() {
18+
return 'application/json';
19+
};
1820
doc = {
1921
headers: headers,
2022
data: {
2123
name: 'hi'
2224
}
2325
};
24-
controller = $controller('DetailCtrl', { doc: doc });
26+
controller = $controller('DetailCtrl', {}, {
27+
doc: doc
28+
});
2529
$rootScope.$apply();
2630
});
2731

28-
it('should be created successfully', function () {
32+
it('should be created successfully', function() {
2933
expect(controller).to.be.defined;
3034
});
3135

app/templates/ui/app/detail/similar-component.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@
2828
});
2929
}
3030

31-
3231
}());

0 commit comments

Comments
 (0)