Follow-up from "Filter Admin Runners by Creator": Improve tests
The following discussions from !132997 (merged) should be addressed:
-
@vshushlin started a discussion: Suggestion/non-blocking: Can we properly create a user and pass it here, something like
let!(:creator) { create(:user) } let_it_be(:runner_with_creator) { create(:ci_runner, creator: creator) } let(:extra_params) { { creator_id: creator.id } } it 'returns correct runners' do is_expected.to contain_exactly(runner_with_creator) end
-
@vshushlin started a discussion: Non-blocking: Can we test this on the requests level instead of resolver level? https://gitlab.com/gitlab-org/gitlab/-/blob/a67fd2ea7996389924674163606530d77212788e/spec/requests/api/graphql/ci/runners_spec.rb#L4-4