Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 569b0c1

Browse files
author
James Kleeh
committed
Add test, Fix test-unit for travis
1 parent 7b8ed27 commit 569b0c1

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var gulp = require('gulp'),
99

1010
gulp.task('test-unit', function(done) {
1111
karma.start({
12-
configFile: __dirname + '\\test\\karma.conf.js',
12+
configFile: __dirname + '/test/karma.conf.js',
1313
singleRun: true
1414
}, done);
1515
});
@@ -51,7 +51,7 @@ gulp.task('bump', ['bump-json'], function() {
5151
var year = date.getFullYear();
5252

5353
return gulp.src('./angular-confirm.js')
54-
.pipe(header(banner, { pkg : pkg, today: (year + '-' + pad(monthIndex) + '-' + pad(day)) } ))
54+
.pipe(header(banner, { pkg : pkg, today: (year + '-' + pad(monthIndex+1) + '-' + pad(day)) } ))
5555
.pipe(gulp.dest('./'));
5656
});
5757

test/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(config) {
1616
// list of files / patterns to load in the browser
1717
files: [
1818
'../node_modules/angular/angular.js',
19-
'../node_modules/angular-bootstrap/dist/ui-bootstrap-tpls.js',
19+
'../node_modules/angular-ui-bootstrap/ui-bootstrap-tpls.min.js',
2020
'../node_modules/angular-mocks/angular-mocks.js',
2121
'../angular-confirm.js',
2222
'unit/**/*Spec.js'

test/unit/confirmSpec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ describe('angular-confirm', function() {
7575
var settings = $confirm({}, {"template": "hello"});
7676
expect(settings.template).toEqual("hello");
7777
});
78+
79+
it("should not change the defaults", function() {
80+
var settings = $confirm({}, {"templateUrl": "hello"});
81+
expect(settings.templateUrl).toEqual("hello");
82+
expect(settings.template).not.toBeDefined();
83+
expect($confirmModalDefaults.template).toBeDefined();
84+
expect($confirmModalDefaults.templateUrl).not.toBeDefined();
85+
});
7886

7987
it("should override the default labels with the data passed in", function() {
8088
var settings = $confirm({title: "Title"});

0 commit comments

Comments
 (0)