summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-05 21:23:10 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-05 21:23:10 +0200
commit1a581a6afcc3ac94dcc2208412bd80861dba84ab (patch)
tree3ef37c1982c7470532420c844d27897721d405ee /spec
parent33a5157ad479a1a9b2f1acd4ce662e98b1a70c43 (diff)
downloadgitlab-ce-1a581a6afcc3ac94dcc2208412bd80861dba84ab.tar.gz
Use a previous approach for cycle analytics dummy pipeline
Diffstat (limited to 'spec')
-rw-r--r--spec/models/project_spec.rb2
-rw-r--r--spec/support/cycle_analytics_helpers.rb5
2 files changed, 3 insertions, 4 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index ae16b497c2f..751ffb2220a 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1523,7 +1523,7 @@ describe Project, models: true do
expect(project.ci_config_path).to eq('foo/.gitlab_ci.yml')
end
- it 'sets a string but remove all leading slashes and null characters' do
+ it 'sets a string but removes all leading slashes and null characters' do
project.update!(ci_config_path: "///f\0oo/\0/.gitlab_ci.yml")
expect(project.ci_config_path).to eq('foo//.gitlab_ci.yml')
diff --git a/spec/support/cycle_analytics_helpers.rb b/spec/support/cycle_analytics_helpers.rb
index 0bbb7e23079..c0a5491a430 100644
--- a/spec/support/cycle_analytics_helpers.rb
+++ b/spec/support/cycle_analytics_helpers.rb
@@ -74,10 +74,9 @@ module CycleAnalyticsHelpers
def dummy_pipeline
@dummy_pipeline ||=
- project.pipelines.build(
+ Ci::Pipeline.new(
sha: project.repository.commit('master').sha,
- ref: 'master',
- source: :push)
+ project: project)
end
def new_dummy_job(environment)