Improve spec performance for snippets API specs
What does this MR do?
This MR is a first attempt to improve the performance of spec/requests/api/snippets_spec.rb
When run locally, the time reduces from 50.11s to 46.16s, a minor improvement of 3.95s
DB queries reduced from 3864 to 3219. Factory usage reduced from 224 to 162.
Queries saved: 645
Contributes to https://gitlab.com/gitlab-org/plan/-/issues/145
Does this MR meet the acceptance criteria?
Conformity
Edited by Vijay Hawoldar