diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-11 13:05:31 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-11 13:05:31 +0200 |
| commit | 0615de013d1e30d147ca7c62fa62a251567337b1 (patch) | |
| tree | 29a0ef63f222209d9e31baf3e54e01d8f224c62d /spec | |
| parent | a8dd4d36e2ba2bcf2488ce12aa0809c339653fc8 (diff) | |
| download | gitlab-ce-0615de013d1e30d147ca7c62fa62a251567337b1.tar.gz | |
Fix ci commits features specs
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/features/ci/commits_spec.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/features/ci/commits_spec.rb b/spec/features/ci/commits_spec.rb index 774beee9a10..40a62ca4574 100644 --- a/spec/features/ci/commits_spec.rb +++ b/spec/features/ci/commits_spec.rb @@ -1,17 +1,20 @@ require 'spec_helper' describe "Commits" do + include Ci::CommitsHelper + context "Authenticated user" do before do - login_as :user @project = FactoryGirl.create :ci_project @commit = FactoryGirl.create :ci_commit, project: @project @build = FactoryGirl.create :ci_build, commit: @commit + login_as :user + @project.gl_project.team << [@user, :master] end describe "GET /:project/commits/:sha" do before do - visit ci_project_ref_commit_path(@project, @commit.ref, @commit.sha) + visit ci_commit_path(@commit) end it { expect(page).to have_content @commit.sha[0..7] } @@ -21,7 +24,7 @@ describe "Commits" do describe "Cancel commit" do it "cancels commit" do - visit ci_project_ref_commit_path(@project, @commit.ref, @commit.sha) + visit ci_commit_path(@commit) click_on "Cancel" expect(page).to have_content "canceled" @@ -30,7 +33,7 @@ describe "Commits" do describe ".gitlab-ci.yml not found warning" do it "does not show warning" do - visit ci_project_ref_commit_path(@project, @commit.ref, @commit.sha) + visit ci_commit_path(@commit) expect(page).not_to have_content ".gitlab-ci.yml not found in this commit" end @@ -39,7 +42,7 @@ describe "Commits" do @commit.push_data[:ci_yaml_file] = nil @commit.save - visit ci_project_ref_commit_path(@project, @commit.ref, @commit.sha) + visit ci_commit_path(@commit) expect(page).to have_content ".gitlab-ci.yml not found in this commit" end @@ -55,7 +58,7 @@ describe "Commits" do describe "GET /:project/commits/:sha" do before do - visit ci_project_ref_commit_path(@project, @commit.ref, @commit.sha) + visit ci_commit_path(@commit) end it { expect(page).to have_content @commit.sha[0..7] } |
