Created
February 12, 2014 02:04
-
-
Save timrwood/8948641 to your computer and use it in GitHub Desktop.
This file contains 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
test('Testing a component', function () { | |
var component = App.ExampleButtonComponent.create({ | |
layoutName : 'components/example-button' | |
}); | |
Ember.run(function () { | |
component.append(); | |
}); | |
equal(component.$('.is-not-enabled').length, 1, 'Should show the .is-not-enabled element'); | |
equal(component.$('.is-enabled').length, 0, 'Should not show the .is-not-enabled element'); | |
Ember.run(function () { | |
component.set('isEnabled', true); | |
}); | |
equal(component.$('.is-not-enabled').length, 0, 'Should not show the .is-not-enabled element'); | |
equal(component.$('.is-enabled').length, 1, 'Should show the .is-not-enabled element'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment