Using html() makes it possible to insert <script> tags in the DOM, and in this case we aren't supposed to be inserting any HTML. I haven't found a way to focus on a field with Capybara, then add a character, and focus on another field. So I've manually triggered the change event in the test.