Convert value to string before setting Poll-Interval header
This commit is contained in:
parent
d4349ba6c4
commit
35bafb3797
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ module Gitlab
|
||||||
value = -1
|
value = -1
|
||||||
end
|
end
|
||||||
|
|
||||||
response.headers[HEADER_NAME] = value
|
response.headers[HEADER_NAME] = value.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.polling_enabled?
|
def self.polling_enabled?
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe Gitlab::PollingInterval, lib: true do
|
||||||
it 'sets value to -1' do
|
it 'sets value to -1' do
|
||||||
polling_interval.set_header(response, interval: 10_000)
|
polling_interval.set_header(response, interval: 10_000)
|
||||||
|
|
||||||
expect(headers['Poll-Interval']).to eq(-1)
|
expect(headers['Poll-Interval']).to eq('-1')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ describe Gitlab::PollingInterval, lib: true do
|
||||||
it 'applies modifier to base interval' do
|
it 'applies modifier to base interval' do
|
||||||
polling_interval.set_header(response, interval: 10_000)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue