gitlab-org--gitlab-foss/spec/support/helpers/expect_request_with_status.rb
Markus Koller f8cecafb07
Add start_sha to commits API
When passing start_branch on committing from the WebIDE, it's possible
that the branch has changed since editing started, which results in the
change being applied on top of the latest commit in the branch and
overwriting the new changes.

By passing the start_sha instead we can make sure that the change is
applied on top of the commit which the user started editing from.
2019-07-18 09:19:18 +02:00

11 lines
206 B
Ruby

# frozen_string_literal: true
module ExpectRequestWithStatus
def expect_request_with_status(status)
expect do
yield
expect(response).to have_gitlab_http_status(status)
end
end
end