Skip to content
  • Yorick Peterse's avatar
    Refactor checking personal project limits · da8b222b69e8
    Yorick Peterse authored
    This refactors the code used for checking if a user has exceeded the
    personal projects limit. As part of this refactor the method has been
    renamed from Project#check_limit to "check_personal_projects_limit", as
    this name makes it much more clear what the purpose of the method is.
    Standalone unit tests have also been added, as before we only had a
    single generic validation test that did not cover all cases.
    
    The old implementation of the refactored method also included a `rescue`
    statement. This code would only run when a project creator was not set.
    The error that would be added wasn't super useful, especially since
    there would already be errors for the creator not being present. As none
    of the other code in the "check_personal_projects_limit" raises, it has
    been removed.
    da8b222b69e8