Web development – Best practices for integration test a web form

I have a web application in Ruby on Rails, which is mainly a great way of several steps that inserts data into a database.
I want to do an integration test to verify that all the inserted data has been saved correctly.

My idea is to make a factory to create a fictitious record, insert all the data in the form using selenium and then compare the db with the fictitious record.
Is this correct?

I do not like the "compare" and "insert" part, because it adds complexity INSIDE the test. Should I simply code all the data?