Add a test for User#ci_authorized_runners
What does this MR do?
Add a test for User#ci_authorized_runners
Are there points in the code the reviewer needs to double check?
Should we add Project#add_user
so that it's similar to Group#add_user
?
Why was this MR needed?
I am going to make some changes to this method for !4093 (merged), but I couldn't find a corresponding test so I want to add it in case I would break anything.
What are the relevant issue numbers?
This is a test for current behaviour, before implementing #3407 (closed)
Merge request reports
Activity
@grzesiek Please review.
Reassigned to @grzesiek
@ayufan Thanks for all the feedback! All updated :) But since I can't find where this was tested in other places, if this didn't take too much time, could you point me out?
796 797 it 'does not load' do 798 is_expected.to be_empty 799 end 800 end 801 802 context 'with personal projects runners' do 803 let(:namespace) { create(:namespace, owner: user) } 804 let(:project) { create(:project, namespace: namespace) } 805 806 it 'loads' do 807 is_expected.to contain_exactly(runner) 808 end 809 end 810 811 shared_examples :member do I am ok with strings (i.e. I'll update it, any preferred words?) but I find it harder to find a sentence than a word for
shared_examples
. This is different thandescribe
orcontext
which I don't have to "refer" them in any sense. But forshared_examples
, I'll need to refer it like a variable, and in Sublime, if you selected a word it would highlight all the same words, which makes it very easy to find where theshared_examples
are used forit_behaves_like
.So it would be great if the name could be kept exactly as a word. (well_this_is_a_word_too)
@godfat I
love it. LGTM! Good work!Edited by Grzegorz BizonReassigned to @DouweM