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:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-11 20:10:14 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-11 20:10:14 +0300
commit34a6f83d3e79670774e916e0b38016a74ae9dff1 (patch)
tree93216af8d230c54d45a7daeb4f0a61869d6b4340 /spec/support
parent771f14b96e058649ca5db7ce6c99e38108d4abec (diff)
Fix API
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/workhorse_helpers.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/support/workhorse_helpers.rb b/spec/support/workhorse_helpers.rb
new file mode 100644
index 00000000000..c5c5d4c63d1
--- /dev/null
+++ b/spec/support/workhorse_helpers.rb
@@ -0,0 +1,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 \ No newline at end of file