Fix problems with review request draft unit tests.
Review Request #8579 — Created Dec. 24, 2016 and submitted — Latest diff uploaded
With some recent changes to fix a bug whereby creating post-commit review
requests wasn't creating the draft object, a couple unit tests broke. The
problem here was that the draft'srepository
object wasn't the same as the
one that the review request is initialized with (because it fetches it
separately), so the spies weren't overriding the right methods.I've fixed these up, and also cleaned up the code to initialize the
Commit
objects with the intended message instead of assigning it after creation.
Ran unit tests.