juju/juju-gui — pull request #330 by jaycee (2014-05-20 03:31:26+00:00)
Title: Adds unit tests for machine column and machine tokens

app/widgets/machine-panel-view.js
* ```_smartUpdateList``` has been refactored, moving its two responsibilities--
adding and removing tokens as necessary--into two methods. These methods are
easier to test, and a bit clearer to read.

tests/test_machine_view_panel_view.js
* Unit tests for all inputs and all expected behavior of the components of
_smartUpdateList have been added.
* Unit tests for _updateMachine and _renderMachineToken have been added

Note to reviewers: machine tokens are also tested in their own file, which has
not been updated. Additionally, invisible in the diff, but available in the
full file, machine column has quite extensive functional testing; I've only
added units to more directly tests private methods that were only implicitly
tested.