summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/polling_interval.rb2
-rw-r--r--spec/lib/gitlab/polling_interval_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/polling_interval.rb b/lib/gitlab/polling_interval.rb
index c44bb1cd14d..f0c50584f07 100644
--- a/lib/gitlab/polling_interval.rb
+++ b/lib/gitlab/polling_interval.rb
@@ -12,7 +12,7 @@ module Gitlab
value = -1
end
- response.headers[HEADER_NAME] = value
+ response.headers[HEADER_NAME] = value.to_s
end
def self.polling_enabled?
diff --git a/spec/lib/gitlab/polling_interval_spec.rb b/spec/lib/gitlab/polling_interval_spec.rb
index 56c2847e26a..5ea8ecb1c30 100644
--- a/spec/lib/gitlab/polling_interval_spec.rb
+++ b/spec/lib/gitlab/polling_interval_spec.rb
@@ -15,7 +15,7 @@ describe Gitlab::PollingInterval, lib: true do
it 'sets value to -1' do
polling_interval.set_header(response, interval: 10_000)
- expect(headers['Poll-Interval']).to eq(-1)
+ expect(headers['Poll-Interval']).to eq('-1')
end
end
@@ -27,7 +27,7 @@ describe Gitlab::PollingInterval, lib: true do
it 'applies modifier to base interval' do
polling_interval.set_header(response, interval: 10_000)
- expect(headers['Poll-Interval']).to eq(3333)
+ expect(headers['Poll-Interval']).to eq('3333')
end
end
end