Skip to content

Commit f1ca399

Browse files
author
Brad Berger
committed
Fixes incorrectly implemeted test
1 parent 79bd1e7 commit f1ca399

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dist/angular-material-calendar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/angular-material-calendar.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ angular.module("materialCalendar").filter("dateToGmt", function() {
99

1010
angular.module("materialCalendar").service("Calendar", ["$filter", function($filter) {
1111

12-
return function(year, month, options) {
12+
function Calendar(year, month, options) {
1313

1414
var now = $filter("dateToGmt")();
1515

@@ -121,13 +121,15 @@ angular.module("materialCalendar").service("Calendar", ["$filter", function($fil
121121

122122
}
123123

124-
return this.dates;
124+
return this.dates;
125125

126126
};
127127

128128
this.init(year, month);
129129

130-
};
130+
}
131+
132+
return Calendar;
131133

132134
}]);
133135

test/unit/calendarService.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe("calendar service", function() {
77
beforeEach(module("materialCalendar"));
88

99
beforeEach(inject(function(_Calendar_){
10-
Calendar = _Calendar_;
10+
Calendar = new _Calendar_();
1111
}));
1212

1313
it("should have all public methods defined", function() {

0 commit comments

Comments
 (0)