• Stan Hu's avatar
    Fix remaining failures in shoulda-matcher · 37a335e6
    Stan Hu authored
    Starting with Rails 5, belongs_to now adds a presence validation to the
    association, and so as of shoulda-matchers 4.0.0 the belong_to matcher
    follows suit and tests that this validation is there by setting the
    association to nil and asserting that there are validation errors. This
    exposed an error with the `validate_branches` method: we need to check
    the source and target project exist.
    37a335e6
merge_request.rb 39.4 KB