Add test for transparently handling form submits

Closes #302