Skip to content

Instantly share code, notes, and snippets.

@kavitshah8
Created April 15, 2014 21:34
Show Gist options
  • Save kavitshah8/10778149 to your computer and use it in GitHub Desktop.
Save kavitshah8/10778149 to your computer and use it in GitHub Desktop.
it( 'sets venue property of a controller & resets it', function(){
var controller = lookup( 'controller', 'network_services.new' );
controller.set( 'model', Ember.Object.create() );
var mockController = sinon.mock( controller );
route.set( 'controller', controller );
mock.expects( 'modelFor' ).withArgs( 'venue' ).returns( venue );
mockController.expects( 'reset' );
route.setupController( controller, model );
expect( controller.get( 'model' ) ).to.equal( model );
expect( controller.get( 'venue' ) ).to.equal( venue );
mock.verify();
mock.restore();
mockController.verify();
mockController.restore();
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment