#module "suppliers-switcher", "SuppliersSwitcherComponent" moduleForComponent "suppliers-switcher" #test "Triggers switch", -> # expect 2 # component = @subject() # controller = App.__container__.lookup('controller:settings') # component.set 'targetObject', controller # Ember.run -> # controller.store.createRecord 'supplier', # id: 'other-supplier' # name: 'Other supplier1' # #component.set 'targetObject', controller # @render() # equal find('ul').text(), "Switch to Other supplier1" # # # Stub the action, since it triggers an external call # component._actions.switchTo = (supplier)-> # equal supplier.get('name'), 'Other supplier1' # # click 'li a'