summaryrefslogtreecommitdiff
path: root/spec/support/workhorse_helpers.rb
blob: c5c5d4c63d1818a147c78429c14a9233e4ac87a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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