Refactor the relation_for_nwr tests to use factories
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 17 May 2017 10:11:04 +0000 (11:11 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 17 May 2017 10:11:04 +0000 (11:11 +0100)
commitc7d612df2d3a6d60582216a28a1426f351a41970
treefccbf44a2a46fa99d9e7bcb7dbfb2ef82ef8fe27
parent084ae0f19109766a7eea248f1d308e24eda1578c
Refactor the relation_for_nwr tests to use factories

This is a bit verbose, since the original tests assumed various other
entities were silently not selected. This also improves the tests
since it considers the case of how to handle a relation with the
target member appearing more than once.
test/controllers/relation_controller_test.rb