summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-08 19:11:52 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-08 19:11:52 +0800
commit07b9b80a8833cf44ba804c9b8dfdf1550785fe83 (patch)
tree4bb39bfd0ca4c7255dc150b015c272be2e26aa72 /spec/models
parent8384d0d8d528ffdd60c9ba9e3c0c9f688cb560ef (diff)
downloadgitlab-ce-07b9b80a8833cf44ba804c9b8dfdf1550785fe83.tar.gz
Fix tests to use the new API
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/cycle_analytics/production_spec.rb8
-rw-r--r--spec/models/cycle_analytics/staging_spec.rb8
2 files changed, 11 insertions, 5 deletions
diff --git a/spec/models/cycle_analytics/production_spec.rb b/spec/models/cycle_analytics/production_spec.rb
index 21b9c6e7150..97568c47903 100644
--- a/spec/models/cycle_analytics/production_spec.rb
+++ b/spec/models/cycle_analytics/production_spec.rb
@@ -21,7 +21,13 @@ describe 'CycleAnalytics#production', feature: true do
["production deploy happens after merge request is merged (along with other changes)",
lambda do |context, data|
# Make other changes on master
- sha = context.project.repository.commit_file(context.user, context.random_git_name, "content", "commit message", 'master', false)
+ sha = context.project.repository.commit_file(
+ context.user,
+ context.random_git_name,
+ 'content',
+ message: 'commit message',
+ branch_name: 'master',
+ update: false)
context.project.repository.commit(sha)
context.deploy_master
diff --git a/spec/models/cycle_analytics/staging_spec.rb b/spec/models/cycle_analytics/staging_spec.rb
index dad653964b7..27c826110fb 100644
--- a/spec/models/cycle_analytics/staging_spec.rb
+++ b/spec/models/cycle_analytics/staging_spec.rb
@@ -28,10 +28,10 @@ describe 'CycleAnalytics#staging', feature: true do
sha = context.project.repository.commit_file(
context.user,
context.random_git_name,
- "content",
- "commit message",
- 'master',
- false)
+ 'content',
+ message: 'commit message',
+ branch_name: 'master',
+ update: false)
context.project.repository.commit(sha)
context.deploy_master