Refactor ssh_keys specs in spec/controllers/users_controller_spec.rb
The following discussions from !48991 (merged) should be addressed:
-
@dbalexandre started a discussion: suggestion (non-blocking): Please add a newline between the execution and the expectation phase.
get :ssh_keys, params: { username: user.username } expect(response.body).not_to match(/dummy@gitlab.com/)
-
@dbalexandre started a discussion: suggestion (non-blocking): Please add a newline between the execution and the expectation phase.
get :ssh_keys, params: { username: user.username } expect(response.body).not_to match(/dummy@gitlab.com/)
-
@dbalexandre started a discussion: context "non existent user" do
-
@dbalexandre started a discussion: context "user with no keys" do
-
@dbalexandre started a discussion: context "user with keys" do
-
@dbalexandre started a discussion: context "while signed in" do
-
@dbalexandre started a discussion: context 'when logged out' do
-
@dbalexandre started a discussion: Both contexts
while signed in
andwhen logged out
have the same tests. What do you think to extract them into shared examples?
Edited by Takuya Noguchi