Code review comment for lp:~allenap/launchpad/no-display-name-from-api-bug-491334

Revision history for this message
Gavin Panella (allenap) wrote :

Add tests to check that the API is not consulted for the subscriber's
display name if no user is logged in. Additionally, check that it is
consulted when the user is logged in, but that it could not be
obtained by other means.

Also, I changed the test_display_name_load_event() test which I at
first thought would never fail, but in fact it would. However, it was
using test.wait() and test.resume() incorrectly because it passed the
*output* of running Y.Assert.areSame() to test.resume() instead of a
function that then does the assertion. In any case, event dispatch
here is synchronous, so I've removed the test.wait() and test.resume()
altogether, making the test simpler.

No lint.

Test: firefox lib/canonical/launchpad/javascript/bugs/tests/subscriber.html

« Back to merge proposal