OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 subordinate: false, | 152 subordinate: false, |
153 icon: undefined, | 153 icon: undefined, |
154 pending: false, | 154 pending: false, |
155 placeFromGhostPosition: false, | 155 placeFromGhostPosition: false, |
156 life: 'alive', | 156 life: 'alive', |
157 units: [], | 157 units: [], |
158 relations: [], | 158 relations: [], |
159 unit_count: undefined, | 159 unit_count: undefined, |
160 upgrade_available: false, | 160 upgrade_available: false, |
161 upgrade_to: undefined, | 161 upgrade_to: undefined, |
162 packageName: undefined | 162 packageName: 'wordpress' |
163 }; | 163 }; |
164 | 164 |
165 assert.deepEqual(attrs, expectedAttrs); | 165 assert.deepEqual(attrs, expectedAttrs); |
166 var units = service.get('units').toArray(); | 166 var units = service.get('units').toArray(); |
167 assert.lengthOf(units, 1); | 167 assert.lengthOf(units, 1); |
168 assert.lengthOf(result.units, 1); | 168 assert.lengthOf(result.units, 1); |
169 assert.strictEqual(units[0], result.units[0]); | 169 assert.strictEqual(units[0], result.units[0]); |
170 assert.equal(units[0].service, 'wordpress'); | 170 assert.equal(units[0].service, 'wordpress'); |
171 }); | 171 }); |
172 | 172 |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 ['cs:wordpress', 'cs:mysql'], | 1597 ['cs:wordpress', 'cs:mysql'], |
1598 ['wordpress:db', 'mysql:db'], | 1598 ['wordpress:db', 'mysql:db'], |
1599 ['wordpress:bar', 'mysql:baz'], | 1599 ['wordpress:bar', 'mysql:baz'], |
1600 {error: 'Relationship does not exist'}, | 1600 {error: 'Relationship does not exist'}, |
1601 done); | 1601 done); |
1602 }); | 1602 }); |
1603 | 1603 |
1604 }); | 1604 }); |
1605 | 1605 |
1606 })(); | 1606 })(); |
OLD | NEW |