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:
authorPatrick Bajao <ebajao@gitlab.com>2019-03-06 13:44:59 +0300
committerNick Thomas <nick@gitlab.com>2019-03-06 13:44:59 +0300
commitde5aef3bbda9217e32fc91c24280f78869c9c9c1 (patch)
tree1c2a7468e0b7f31134ee7b6e9f537b798fdf724e /spec/services
parentc9e5ce8dbd25203484b43c48f0a55a5d7bf396e8 (diff)
Accept force option on commit via API
When `force` is set to `true` and `start_branch` is set, the branch will be ovewritten with the new commit based on the `HEAD` of the `start_branch`. This commit includes changes to update the `gitaly-proto` gem.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/files/multi_service_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/files/multi_service_spec.rb b/spec/services/files/multi_service_spec.rb
index 84c48d63c64..6842fa9f435 100644
--- a/spec/services/files/multi_service_spec.rb
+++ b/spec/services/files/multi_service_spec.rb
@@ -235,6 +235,22 @@ describe Files::MultiService do
expect(blob).to be_present
end
end
+
+ context 'when force is set to true and branch already exists' do
+ let(:commit_params) do
+ {
+ commit_message: commit_message,
+ branch_name: 'feature',
+ start_branch: 'master',
+ actions: actions,
+ force: true
+ }
+ end
+
+ it 'is still a success' do
+ expect(subject.execute[:status]).to eq(:success)
+ end
+ end
end
def update_file(path)