Neues Initialrelease mit IonicMaterial

This commit is contained in:
Carsten Hilmer
2016-08-22 12:55:52 +02:00
parent 30a5df79aa
commit 45e482b14d
1249 changed files with 305225 additions and 68794 deletions

View File

@@ -0,0 +1,48 @@
describe('Service: $cordovaFileOpener2', function(){
var $cordovaFileOpener2, $rootScope, $window;
beforeEach(function() {
module('ngCordovaMocks');
});
beforeEach(inject(function (_$cordovaFileOpener2_, _$q_, _$rootScope_, _$window_) {
$cordovaFileOpener2 = _$cordovaFileOpener2_;
$rootScope = _$rootScope_;
$window = _$window_;
}));
it('should call window\'s plugins.fileOpener2.open method of success', function(done) {
$cordovaFileOpener2.open(
'/sdcard/Download/gmail.apk',
'application/vnd.android.package-archive'
).then(
function () {
expect(true).toBe(true);
},
function() {
expect(false).toBe(true);
}
).finally(done);
$rootScope.$digest();
});
it('should call window\'s plugins.fileOpener2.open method of failure', function(done) {
$cordovaFileOpener2.throwsError = true;
$cordovaFileOpener2.open(
'/sdcard/Download/gmail.apk',
'application/vnd.android.package-archive'
).then(
function () {
expect(true).toBe(true);
},
function() {
expect(false).toBe(true);
}
).finally(done);
$rootScope.$digest();
});
});