mirror of
https://github.com/cmur2/openvpn-status-web.git
synced 2025-06-28 14:30:23 +02:00
gems: include rubocop-rspec and fix linting
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../spec_helper'
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe OpenVPNStatusWeb::Parser::ModernStateless do
|
||||
{
|
||||
@ -8,7 +8,7 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
|
||||
3 => status_v3
|
||||
}.each do |version, status|
|
||||
context "for status-version #{version}" do
|
||||
context 'for client list' do
|
||||
context 'with client list' do
|
||||
it 'parses common names' do
|
||||
expect(status.client_list.map { |client| client[0] }).to eq(%w[foo bar])
|
||||
end
|
||||
@ -34,7 +34,7 @@ describe OpenVPNStatusWeb::Parser::ModernStateless do
|
||||
end
|
||||
end
|
||||
|
||||
context 'for routing table' do
|
||||
context 'with routing table' do
|
||||
it 'parses virtual addresses' do
|
||||
expect(status.routing_table.map { |route| route[0] }).to eq(['192.168.0.0/24', '192.168.66.2', '192.168.66.3', '2001:db8:0:0::1000'])
|
||||
end
|
@ -1,13 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../spec_helper'
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe OpenVPNStatusWeb::Parser::V1 do
|
||||
def status
|
||||
status_v1
|
||||
end
|
||||
|
||||
context 'for client list' do
|
||||
context 'with client list' do
|
||||
it 'parses common names' do
|
||||
expect(status.client_list.map { |client| client[0] }).to eq(%w[foo bar])
|
||||
end
|
||||
@ -33,7 +33,7 @@ describe OpenVPNStatusWeb::Parser::V1 do
|
||||
end
|
||||
end
|
||||
|
||||
context 'for routing table' do
|
||||
context 'with routing table' do
|
||||
it 'parses virtual addresses' do
|
||||
expect(status.routing_table.map { |route| route[0] }).to eq(['192.168.0.0/24', '192.168.66.2', '192.168.66.3', '2001:db8:0:0::1000'])
|
||||
end
|
Reference in New Issue
Block a user