Created
September 26, 2012 05:06
-
-
Save brian428/3786197 to your computer and use it in GitHub Desktop.
SpyOn_toHaveBeenCalled.coffee
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
| it "should update the current company upon selection", -> | |
| store = Deft.ioc.Injector.resolve( "companyStore" ) | |
| waitsFor( ( -> store.getCount() > 0 ), "Store data never loaded.", 2000 ) | |
| runs( -> | |
| grid = viewController.getCompanyGridPanel() | |
| spyOn( viewController, 'setCurrentCompany' ) | |
| firstCompany = grid.store.getAt( 0 ) | |
| grid.fireEvent( "selectionchange", {}, [ firstCompany ] ) | |
| expect( viewController.setCurrentCompany ).toHaveBeenCalled() | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment