gitlab-org--gitlab-foss/spec/support/workhorse_helpers.rb
2016-02-17 15:22:33 +01:00

16 lines
380 B
Ruby

module WorkhorseHelpers
extend self
def workhorse_send_data
@_workhorse_send_data ||= begin
header = response.headers[Gitlab::Workhorse::SEND_DATA_HEADER]
split_header = header.split(':')
type = split_header.shift
header = split_header.join(':')
[
type,
JSON.parse(Base64.urlsafe_decode64(header)),
]
end
end
end