Added can_test? mehod to Service model and added tests
Merge pull request #4750 from ronaldvaneede/test_service_button

Fix for #4535 ('Test settings' button for services gives 500 on empty repo)