All of this repitious code should go in a before block or something. Also, the link can be created using Factory Girl. See the following:

https://github.com/CUNY-TAP/linkit/blob/integration_tests/spec/integration/links_spec.rb