Created
July 7, 2014 11:48
-
-
Save sayak-sarkar/ec513bd118bbe42918c5 to your computer and use it in GitHub Desktop.
PublicationListCtrl Unit Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Unit: Testing Owner PublicationListCtrl', function() { | |
beforeEach(angular.mock.module('incidentapp_worker')); | |
var publicationListCtrl, scope, publicationList; | |
beforeEach(angular.mock.inject(function ($controller, $rootScope, $location) { | |
publicationList = {}; | |
scope = $rootScope.$new(); | |
publicationListCtrl = $controller('PublicationListCtrl', { | |
$scope: scope, | |
$location: $location, | |
publicationList: publicationList | |
}) | |
})); | |
it('should have a PublicationListCtrl controller', function() { | |
expect(publicationListCtrl).not.to.equal(null); | |
}); | |
it('should have publications and newestPublications defined', function() { | |
expect(scope.publications).not.to.equal(undefined); | |
expect(scope.newestPublications).not.to.equal(undefined); | |
}); | |
it('should have a showPublication function defined', function() { | |
expect(scope.showPublication).not.to.equal(undefined); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment