AR integration tests for form helpers

As suggested in #8623, I'm adding AR integration tests for form helpers.
Please review the code. If it's alright, I'll add a few more tests and fixes to the pull request.