diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-18 15:06:41 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-18 15:16:54 -0400 |
commit | 5b37f21bf2c3a9bc6006bcdfbcbc04d19b9b9b86 (patch) | |
tree | 0e5491276e362c218b8f8be2a2b591d8429f77da /lib/api/snippets.rb | |
parent | bb40f4ab6ec2aa8e435b6f5b6cbcf2d316008add (diff) | |
download | gitlab-ce-5b37f21bf2c3a9bc6006bcdfbcbc04d19b9b9b86.tar.gz |
Reduce duplication in GitAccess spec around error messagesrs-git-access-spec-speed
- Adds a new `ProjectMovedError` class to encapsulate that error
condition. Inherits from `NotFoundError` so existing rescues should
continue to work.
- Separating that condition out of `NotFoundError` allowed us to
simplify the `raise_not_found` helper and avoid repeating the literal
string.
- Spec makes use of `ERROR_MESSAGES` hash to avoid repeating literal
error message strings.
Diffstat (limited to 'lib/api/snippets.rb')
0 files changed, 0 insertions, 0 deletions