1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2025-06-28 14:30:23 +02:00

gem: refactor to prepare supporting flexible list headers

This commit is contained in:
cn
2022-01-17 11:37:50 +01:00
committed by Christian Nicolai
parent 406ed867f7
commit 39d2b3ce94
6 changed files with 72 additions and 18 deletions

View File

@ -32,6 +32,10 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
]
)
end
it 'has the same number of headers' do
expect(status.client_list[0].length).to eq(status.client_list_headers.length)
end
end
context 'with routing table' do
@ -55,6 +59,10 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
]
)
end
it 'has the same number of headers' do
expect(status.routing_table[0].length).to eq(status.routing_table_headers.length)
end
end
it 'parses global stats' do

View File

@ -31,6 +31,10 @@ describe OpenVPNStatusWeb::Parser::V1 do
]
)
end
it 'has the same number of headers' do
expect(status.client_list[0].length).to eq(status.client_list_headers.length)
end
end
context 'with routing table' do
@ -54,6 +58,10 @@ describe OpenVPNStatusWeb::Parser::V1 do
]
)
end
it 'has the same number of headers' do
expect(status.routing_table[0].length).to eq(status.routing_table_headers.length)
end
end
it 'parses global stats' do