diff options
Diffstat (limited to 'spec/features/commits_spec.rb')
-rw-r--r-- | spec/features/commits_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/commits_spec.rb b/spec/features/commits_spec.rb index ab2d85371bf..0373f649ee8 100644 --- a/spec/features/commits_spec.rb +++ b/spec/features/commits_spec.rb @@ -4,10 +4,11 @@ describe 'Commits' do include CiStatusHelper let(:project) { create(:project, :repository) } + let(:user) { create(:user) } describe 'CI' do before do - gitlab_sign_in :user + sign_in(user) stub_ci_pipeline_to_return_yaml_file end @@ -27,7 +28,7 @@ describe 'Commits' do let!(:status) { create(:generic_commit_status, pipeline: pipeline) } before do - project.team << [@user, :reporter] + project.team << [user, :reporter] end describe 'Commit builds' do @@ -52,7 +53,7 @@ describe 'Commits' do context 'when logged as developer' do before do - project.team << [@user, :developer] + project.team << [user, :developer] end describe 'Project commits' do @@ -146,7 +147,7 @@ describe 'Commits' do context "when logged as reporter" do before do - project.team << [@user, :reporter] + project.team << [user, :reporter] build.update_attributes(artifacts_file: artifacts_file) visit ci_status_path(pipeline) end @@ -187,11 +188,10 @@ describe 'Commits' do context 'viewing commits for a branch' do let(:branch_name) { 'master' } - let(:user) { create(:user) } before do project.team << [user, :master] - gitlab_sign_in(user) + sign_in(user) visit namespace_project_commits_path(project.namespace, project, branch_name) end |