Judging by this ticket on jasmine-jquery's github page
toHaveHtml() is more exacting using a ==
check
Whereas toContainHtml() uses an indexOf()
check.
However the example in the documentation doesn't really demonstrate this, so I'm still not certain.