Update validations for Push Mirrors
What does this MR do and why?
Contributes to #455517 (closed)
Problem
- Push mirror update endpoint is missing tests for error cases
-
only_protected_branches
validation is missing and triggers 'ActiveRecord::NotNullViolation' exception. - [Minor] Code to find remote mirror object is duplicated
Solution
- Add extra tests
- Add a validation for a boolean field
- Extract common code into a helper