Last active
July 6, 2016 16:37
-
-
Save alecklandgraf/200eb6ca7f3ba5dca1eaa094be5d6724 to your computer and use it in GitHub Desktop.
hello component test with component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("hello nav component", function(){ | |
// globals set up and used in each test scenario | |
var $componentController; | |
beforeEach(module('app')); | |
beforeEach(inject(function(_$componentController_) { | |
$componentController = _$componentController_; | |
})); | |
it('should bind its data to me on the controller', function () { | |
var me = {first_name: 'Aleck', last_name: 'Landgraf'}; | |
var ctrl = $componentController('helloNav', null, {me: me}); | |
expect(ctrl.me).toBeDefined(); | |
expect(ctrl.me.first_name).toBe('Aleck'); | |
expect(ctrl.me.last_name).toBe('Landgraf'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment