Add section elements

This commit is contained in:
2015-03-01 12:57:20 +01:00
parent 832f80e20e
commit 275b4524bc
62 changed files with 10388 additions and 124 deletions
View File
@@ -0,0 +1,21 @@
#module "suppliers-switcher", "SuppliersSwitcherComponent"
moduleForComponent "suppliers-switcher"
test "Triggers switch", ->
component = @subject()
controller = App.__container__.lookup('controller:settings')
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"
s_name = null
# Stub the action, since it triggers an external call
component._actions.switchTo = (supplier)->
s_name = supplier.get('name')
click 'li a'
equal s_name, 'Other supplier1'