diff options
Diffstat (limited to 'www/lib/ngCordova/dist/ng-cordova-mocks.js')
| -rw-r--r-- | www/lib/ngCordova/dist/ng-cordova-mocks.js | 75 |
1 files changed, 73 insertions, 2 deletions
diff --git a/www/lib/ngCordova/dist/ng-cordova-mocks.js b/www/lib/ngCordova/dist/ng-cordova-mocks.js index d8cd634f..3d59dc84 100644 --- a/www/lib/ngCordova/dist/ng-cordova-mocks.js +++ b/www/lib/ngCordova/dist/ng-cordova-mocks.js @@ -1,7 +1,7 @@ /*! * ngCordova - * v0.1.18-alpha - * Copyright 2014 Drifty Co. http://drifty.com/ + * v0.1.20-alpha + * Copyright 2015 Drifty Co. http://drifty.com/ * See LICENSE in this repository for license information */ (function(){ @@ -1104,6 +1104,77 @@ ngCordovaMocks.factory('$cordovaDialogs', ['$q', function ($q) { /** * @ngdoc service + * @name ngCordovaMocks.cordovaFacebook + * + * @description + * A service for testing Facebook features + * in an app built with ngCordova. + **/ +ngCordovaMocks.factory('$cordovaFacebook', ['$q', function ($q) { + return { + + /** + * These properties are here for the purpose of automated testing only. + **/ + loginShouldSucceedWith: null, + showDialogShouldSucceedWith: null, + apiShouldSucceedWith: null, + getAccessTokenShouldSucceedWith: null, + getLoginStatusShouldSucceedWith: null, + logoutShouldSuceedWith: null, + + login: function (permissions) { + if (this.loginShouldSucceedWith !== null) { + return $q.when(this.loginShouldSucceedWith); + } else { + return $q.reject(); + } + }, + + showDialog: function (options) { + if (this.showDialogShouldSucceedWith !== null) { + return $q.when(this.showDialogShouldSucceedWith); + } else { + return $q.reject(); + } + }, + + api: function (path, permissions) { + if (this.apiShouldSucceedWith !== null) { + return $q.when(this.apiShouldSucceedWith); + } else { + return $q.reject(); + } + }, + + getAccessToken: function () { + if (this.getAccessTokenShouldSucceedWith !== null) { + return $q.when(this.getAccessTokenShouldSucceedWith); + } else { + return $q.reject(); + } + }, + + getLoginStatus: function () { + if (this.getLoginStatusShouldSucceedWith !== null) { + return $q.when(this.getLoginStatusShouldSucceedWith); + } else { + return $q.reject(); + } + }, + + logout: function () { + if (this.logoutShouldSuceedWith !== null) { + return $q.when(this.logoutShouldSuceedWith); + } else { + return $q.reject(); + } + } + }; +}]); + +/** + * @ngdoc service * @name ngCordovaMocks.cordovaFile * * @description |
