Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/ci/jobs_helper_spec.rb')
-rw-r--r--spec/helpers/ci/jobs_helper_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/helpers/ci/jobs_helper_spec.rb b/spec/helpers/ci/jobs_helper_spec.rb
index a9ab4ab3b67..30cad66af04 100644
--- a/spec/helpers/ci/jobs_helper_spec.rb
+++ b/spec/helpers/ci/jobs_helper_spec.rb
@@ -6,14 +6,19 @@ RSpec.describe Ci::JobsHelper do
describe 'job helper functions' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:job) { create(:ci_build, project: project) }
+ let_it_be(:user) { create(:user) }
before do
helper.instance_variable_set(:@project, project)
helper.instance_variable_set(:@build, job)
+
+ allow(helper)
+ .to receive(:current_user)
+ .and_return(user)
end
it 'returns jobs data' do
- expect(helper.jobs_data).to include({
+ expect(helper.jobs_data(project, job)).to include({
"endpoint" => "/#{project.full_path}/-/jobs/#{job.id}.json",
"project_path" => project.full_path,
"artifact_help_url" => "/help/user/gitlab_com/index.md#gitlab-cicd",