Moved menu stuff to own controller

This commit is contained in:
Blade Barringer
2015-06-29 12:38:46 -05:00
parent 2f48534342
commit bc837fd4db
7 changed files with 78 additions and 44 deletions

View File

@@ -0,0 +1,26 @@
'use strict';
describe('Menu Controller', function() {
describe('MenuCtrl', function(){
var scope, ctrl, user, $httpBackend, $window;
beforeEach(function(){
module(function($provide) {
$provide.value('Chat', { seenMessage: function() {} });
});
inject(function(_$httpBackend_, $rootScope, $controller) {
scope = $rootScope.$new();
ctrl = $controller('MenuCtrl', {$scope: scope, $window: $window, User: user});
})
});
describe('clearMessage', function() {
it('is Chat.seenMessage', inject(function(Chat) {
expect(scope.clearMessages).to.eql(Chat.seenMessage);
}));
});
});
});