Commit 35bafb37 authored by Adam Niedzielski's avatar Adam Niedzielski

Convert value to string before setting Poll-Interval header

parent d4349ba6
......@@ -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?
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment