OLD | NEW |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 describe('topology', function() { | 3 describe('topology', function() { |
4 var Y, NS, views, | 4 var Y, NS, views, |
5 TestModule, modA, state, | 5 TestModule, modA, state, |
6 container, topo, | 6 container, topo, |
7 models, | 7 models, |
8 db; | 8 db; |
9 | 9 |
10 before(function(done) { | 10 before(function(done) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // The context is used to do the destroying, so if it does not have the | 108 // The context is used to do the destroying, so if it does not have the |
109 // destroy method, an exception will be raised if the service would be | 109 // destroy method, an exception will be raised if the service would be |
110 // destroyed. | 110 // destroyed. |
111 var context = { | 111 var context = { |
112 get: function(name) { | 112 get: function(name) { |
113 if (name === 'component') { | 113 if (name === 'component') { |
114 return fauxTopo; | 114 return fauxTopo; |
115 } | 115 } |
116 }, | 116 }, |
117 service_click_actions: { | 117 service_click_actions: { |
118 toggleServiceMenu: function() {}, | 118 hideServiceMenu: function() {}, |
119 destroyServiceConfirm: function() {} | 119 destroyServiceConfirm: function() {} |
120 } | 120 } |
121 }; | 121 }; |
122 topo.modules.ServiceModule.destroyServiceClick(undefined, context); | 122 topo.modules.ServiceModule.destroyServiceClick(undefined, context); |
123 }); | 123 }); |
124 }); | 124 }); |
125 | 125 |
126 describe('service menu', function() { | 126 describe('service menu', function() { |
127 var Y, views; | 127 var Y, views; |
128 | 128 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 }, | 166 }, |
167 updateServiceMenuLocation: function() {} | 167 updateServiceMenuLocation: function() {} |
168 }; | 168 }; |
169 var view = new views.ServiceModule(); | 169 var view = new views.ServiceModule(); |
170 view.service_click_actions.toggleServiceMenu( | 170 view.service_click_actions.toggleServiceMenu( |
171 service, fauxView, undefined); | 171 service, fauxView, undefined); |
172 assert.equal(addedClassName, 'disabled'); | 172 assert.equal(addedClassName, 'disabled'); |
173 }); | 173 }); |
174 | 174 |
175 }); | 175 }); |
OLD | NEW |