mirror of
https://github.com/Febbweiss/CloudBudget-AngularJS.git
synced 2026-03-04 22:35:38 +00:00
23 lines
691 B
JavaScript
23 lines
691 B
JavaScript
describe('HomeController', function() {
|
|
|
|
var rootScope;
|
|
|
|
beforeEach(module('cloudbudget'));
|
|
|
|
beforeEach(inject(function($rootScope) {
|
|
rootScope = $rootScope.$new();
|
|
}));
|
|
|
|
describe('getFullname()', function() {
|
|
it('should handle names correctly', inject(function($controller) {
|
|
var scope = {};
|
|
var homeController = $controller('HomeController', {
|
|
'$rootScope': rootScope
|
|
});
|
|
|
|
homeController.firstname = 'George';
|
|
homeController.lastname = 'Harrison';
|
|
homeController.getFullname().should.be.equal('George Harrison');
|
|
}));
|
|
});
|
|
}); |