diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-15 16:13:28 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-16 14:09:30 +0100 |
commit | 2d9a6f2bd3b4ac55d5e59c8e9eb2013fa46798d9 (patch) | |
tree | 96482dbbe30bfb709f0cb039c3902ea3daca775a /doc/gitlab-basics/start-using-git.md | |
parent | 8b4b7caefa7fba49a8b199edfde8315a4c897a68 (diff) | |
download | gitlab-ce-2d9a6f2bd3b4ac55d5e59c8e9eb2013fa46798d9.tar.gz |
Refactor checking personal project limits
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.
Diffstat (limited to 'doc/gitlab-basics/start-using-git.md')
0 files changed, 0 insertions, 0 deletions