Tests: added Ruby tests with array in header values

This commit is contained in:
Andrei Zeliankou
2024-01-15 17:53:46 +00:00
committed by andrey-zelenkov
parent a1e00b4e28
commit 4e08f49549
4 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
app = Proc.new do |env|
['200', {
'x-array' => ['name=value', '', 'value', 'av'],
}, []]
end
run app

View File

@@ -0,0 +1,7 @@
app = Proc.new do |env|
['200', {
'x-array' => [],
}, []]
end
run app

View File

@@ -0,0 +1,7 @@
app = Proc.new do |env|
['200', {
'x-array' => [nil],
}, []]
end
run app

View File

@@ -309,6 +309,26 @@ def test_ruby_application_header_status():
assert client.get()['status'] == 200, 'header status'
def test_ruby_application_header_array():
client.load('header_array')
assert client.get()['headers']['x-array'] == 'name=value; ; value; av'
def test_ruby_application_header_array_nil():
client.load('header_array_nil')
assert client.get()['status'] == 503
def test_ruby_application_header_array_empty():
client.load('header_array_empty')
headers = client.get()['headers']
assert 'x-array' in headers
assert headers['x-array'] == ''
@pytest.mark.skip('not yet')
def test_ruby_application_header_rack():
client.load('header_rack')