Commit 186ce3ad authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix the other renaming

parent 9dd06059
...@@ -306,12 +306,12 @@ feature 'Jobs', :feature do ...@@ -306,12 +306,12 @@ feature 'Jobs', :feature do
end end
end end
context 'build project is over shared runners limit' do context 'job project is over shared runners limit' do
let(:group) { create(:group, :with_used_build_minutes_limit) } let(:group) { create(:group, :with_used_build_minutes_limit) }
let(:project) { create(:project, namespace: group, shared_runners_enabled: true) } let(:project) { create(:project, namespace: group, shared_runners_enabled: true) }
it 'displays a warning message' do it 'displays a warning message' do
visit namespace_project_build_path(project.namespace, project, build) visit namespace_project_job_path(project.namespace, project, job)
expect(page).to have_content('You have used all your shared Runners pipeline minutes.') expect(page).to have_content('You have used all your shared Runners pipeline minutes.')
end end
...@@ -335,9 +335,9 @@ feature 'Jobs', :feature do ...@@ -335,9 +335,9 @@ feature 'Jobs', :feature do
context "Job from other project" do context "Job from other project" do
before do before do
build.run! job.run!
visit namespace_project_job_path(project.namespace, project, build) visit namespace_project_job_path(project.namespace, project, job)
page.driver.post(cancel_namespace_project_job_path(project.namespace, project, build2)) page.driver.post(cancel_namespace_project_job_path(project.namespace, project, job2))
end end
it { expect(page.status_code).to eq(404) } it { expect(page.status_code).to eq(404) }
...@@ -366,10 +366,10 @@ feature 'Jobs', :feature do ...@@ -366,10 +366,10 @@ feature 'Jobs', :feature do
context "Job from other project" do context "Job from other project" do
before do before do
build.run! job.run!
visit namespace_project_job_path(project.namespace, project, build) visit namespace_project_job_path(project.namespace, project, job)
click_link 'Cancel' click_link 'Cancel'
page.driver.post(retry_namespace_project_job_path(project.namespace, project, build2)) page.driver.post(retry_namespace_project_job_path(project.namespace, project, job2))
end end
it { expect(page).to have_http_status(404) } it { expect(page).to have_http_status(404) }
......
...@@ -26,7 +26,7 @@ describe API::Jobs, :api do ...@@ -26,7 +26,7 @@ describe API::Jobs, :api do
let(:query) { Hash.new } let(:query) { Hash.new }
before do before do
build job
get api("/projects/#{project.id}/jobs", api_user), query get api("/projects/#{project.id}/jobs", api_user), query
end end
...@@ -90,7 +90,7 @@ describe API::Jobs, :api do ...@@ -90,7 +90,7 @@ describe API::Jobs, :api do
let(:query) { Hash.new } let(:query) { Hash.new }
before do before do
build job
get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query
end end
...@@ -209,7 +209,7 @@ describe API::Jobs, :api do ...@@ -209,7 +209,7 @@ describe API::Jobs, :api do
it 'returns specific job artifacts' do it 'returns specific job artifacts' do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(response.headers).to include(download_headers) expect(response.headers).to include(download_headers)
expect(response.body).to match_file(build.artifacts_file.file.file) expect(response.body).to match_file(job.artifacts_file.file.file)
end end
end end
...@@ -223,7 +223,7 @@ describe API::Jobs, :api do ...@@ -223,7 +223,7 @@ describe API::Jobs, :api do
end end
context 'when artifacts are stored remotely' do context 'when artifacts are stored remotely' do
let(:build) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) } let(:job) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) }
it 'returns location redirect' do it 'returns location redirect' do
expect(response).to have_http_status(302) expect(response).to have_http_status(302)
...@@ -309,7 +309,7 @@ describe API::Jobs, :api do ...@@ -309,7 +309,7 @@ describe API::Jobs, :api do
end end
context 'when artifacts are stored remotely' do context 'when artifacts are stored remotely' do
let(:build) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) } let(:job) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) }
it 'returns location redirect' do it 'returns location redirect' do
expect(response).to have_http_status(302) expect(response).to have_http_status(302)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment