Skip to content

Instantly share code, notes, and snippets.

@ctataryn
Created November 20, 2014 18:06
Show Gist options
  • Save ctataryn/4b5b95d27063275d8489 to your computer and use it in GitHub Desktop.
Save ctataryn/4b5b95d27063275d8489 to your computer and use it in GitHub Desktop.
test('it has the right css class when the cart is empty', function() {
expect(2);
var component = this.subject({
cartEmpty: false
});
this.append();
ok(component.$().find('#cartCheckoutLink').length, 'The view-cart component should be enabled if the cart is not empty');
Ember.run(function(){
component.set('cartEmpty', true);
ok(component.$().find('#cartCheckoutLinkDisabled').length, 'The view-cart component should be disabled if the cart is empty');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment