Repair remaining Karma specs - all passing.

* Stubbed out User module to repair rootCtrlSpec

* Loaded RootCtrl in inventoryCtrlSpec, as it was missing shared functions.
  Updated mock user to include a mounts hash.
This commit is contained in:
Kevin Gisi
2015-03-22 21:56:01 -04:00
parent 2194caec15
commit 1e59336d09
2 changed files with 38 additions and 24 deletions

View File

@@ -1,17 +1,23 @@
'use strict';
// @TODO: Something here is calling a full page reload
xdescribe('Root Controller', function() {
describe('Root Controller', function() {
var scope, user, ctrl;
beforeEach(inject(function($rootScope, $controller) {
scope = $rootScope.$new();
scope.loginUsername = 'user'
scope.loginPassword = 'pass'
user = specHelper.newUser();
beforeEach(function () {
module(function($provide) {
$provide.value('User', {});
});
ctrl = $controller('RootCtrl', {$scope: scope, User: {user: user}});
}));
inject(function($rootScope, $controller) {
scope = $rootScope.$new();
scope.loginUsername = 'user'
scope.loginPassword = 'pass'
user = specHelper.newUser();
ctrl = $controller('RootCtrl', {$scope: scope, User: {user: user}});
});
});
it('shows contributor level text', function(){
expect(scope.contribText()).to.eql(undefined);