mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
amend($ionicConfigProvider): fix typo, add unit tests
This commit is contained in:
22
test/unit/angular/service/ionicConfig.unit.js
Normal file
22
test/unit/angular/service/ionicConfig.unit.js
Normal file
@@ -0,0 +1,22 @@
|
||||
describe('$ionicConfigProvider', function() {
|
||||
|
||||
it('should give default true', function() {
|
||||
module('ionic', function($ionicConfigProvider) {
|
||||
expect($ionicConfigProvider.prefetchTemplates()).toBe(true);
|
||||
});
|
||||
inject(function($ionicConfig) {
|
||||
expect($ionicConfig.prefetchTemplates).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
it('should allow setting', function() {
|
||||
module('ionic', function($ionicConfigProvider) {
|
||||
$ionicConfigProvider.prefetchTemplates(false);
|
||||
expect($ionicConfigProvider.prefetchTemplates()).toBe(false);
|
||||
});
|
||||
inject(function($ionicConfig) {
|
||||
expect($ionicConfig.prefetchTemplates).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user