mirror of
https://github.com/Febbweiss/CloudBudget-AngularJS.git
synced 2026-03-04 22:35:38 +00:00
First commit
This commit is contained in:
23
test/home.controller.js
Normal file
23
test/home.controller.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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');
|
||||
}));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user