Skip to content

Instantly share code, notes, and snippets.

@erickertz
Created December 22, 2014 19:21
Show Gist options
  • Save erickertz/8af6934a98eeba8103be to your computer and use it in GitHub Desktop.
Save erickertz/8af6934a98eeba8103be to your computer and use it in GitHub Desktop.
describe('ReceiptCtrl', function() {
describe('$scope.createEmailSub function', function(){
var $scope;
beforeEach(function() {
module('receipt');
module(function($provide) {
$provide.value('UOHttp', {});
$provide.value('ReceiptData', { get: function(what){ return true; } });
$provide.value('Tracking', {});
});
inject(function(_$rootScope_, $controller) {
$rootScope = _$rootScope_;
$rootScope.messaging = true;
$scope = $rootScope.$new();
$scope.messaging = true;
$scope.isUrbanUS = function(where){ return true; };
$scope.userData = {siteId: "100001"};
$scope.cartData = {commerceItems: []};
$scope.currentOrder = {commerceItems: []};
$controller('ReceiptCtrl', {
$scope: $scope,
});
});
});
it('breadcrumb should equal 4', function(){
$scope.$apply();
//var createEmailSubSuccess = $scope.createEmailSub({});
var currentBreadcrumb = $scope.currentBreadcrumb;
expect(currentBreadcrumb).toEqual(4);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment