I have the following component:
angular.module('foo')
.component('searchInput', {
bindings: {
text: "<query"
},
templateUrl: 'components/searchInput/searchInput.html',
controller: 'SearchInputCtrl'
});
For the following to pass:
expect(component.text).toBe('bar');
I have to use the following code:
var component = $componentController('searchInput',
{$scope: {}},
{
text: 'bar'
}
);
However, I want to test that the value being bound to 'text' is being sourced from 'query'. This does not work:
var component = $componentController('searchInput',
{$scope: {}},
{
query: 'bar'
}
);