Last active
August 29, 2015 14:01
-
-
Save dubilla/7751bd858b242bc8a124 to your computer and use it in GitHub Desktop.
Directive Test
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 'Deal Term Display', -> | |
HTML = '<div deal-terms></div>' | |
scope = elem = DealTerm = null | |
beforeEach -> | |
inject ($compile, $rootScope, _DealTerm_) -> | |
DealTerm = _DealTerm_ | |
scope = $rootScope.$new() | |
scope.log = deal_terms: [] | |
scope.showthis = true | |
elem = angular.element(HTML) | |
$compile(elem)(scope) | |
scope.$apply() | |
describe.only 'showthis', -> | |
it 'should show this', -> | |
expect(elem.find('.ubilla')).to.have.length 1 |
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
.deal-terms{'ng-class'=>"{expanded: limit > 1}"} | |
.ubilla{'ng-if' => 'showthis'} | |
%a.deal-terms-expand{href:'', 'ng-click'=>"toggleExpansion()", 'ng-show'=>"log.deal_terms.length > 1"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment