home.controller.js 691 B

1234567891011121314151617181920212223
  1. describe('HomeController', function() {
  2. var rootScope;
  3. beforeEach(module('cloudbudget'));
  4. beforeEach(inject(function($rootScope) {
  5. rootScope = $rootScope.$new();
  6. }));
  7. describe('getFullname()', function() {
  8. it('should handle names correctly', inject(function($controller) {
  9. var scope = {};
  10. var homeController = $controller('HomeController', {
  11. '$rootScope': rootScope
  12. });
  13. homeController.firstname = 'George';
  14. homeController.lastname = 'Harrison';
  15. homeController.getFullname().should.be.equal('George Harrison');
  16. }));
  17. });
  18. });