private
# Reverses the relation if needed so that it gets stored in the proper way
+ # Should not be reversed before validation so that it can be displayed back
+ # as entered on new relation form
def reverse_if_needed
if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse]
issue_tmp = issue_to
assert_equal from, relation.issue_to
end
- # TODO : document why it shouldn't be reversed if validation fails : having
- # relations reversed before the validation would allow simpler code for the
- # validation
def test_follows_relation_should_not_be_reversed_if_validation_fails
from = Issue.find(1)
to = Issue.find(2)