Created
March 30, 2015 14:21
-
-
Save code0100fun/f5922b6f44eee2abc21d to your computer and use it in GitHub Desktop.
Ember component with optional block
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
//tests/unit/components/*.js | |
test('component with optional block', function(assert) { | |
assert.expect(1); | |
var component = this.subject(); | |
Ember.run(function(){ | |
component.set('template', function(){ return 'Something else'; }); | |
component.set('defaultContent', 'foo'); | |
}); | |
assert.trimEq(this.$().text(), 'Something else'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment