ip_block_spec.rb 343 B

123456789101112131415
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe IpBlock do
  4. describe 'to_log_human_identifier' do
  5. let(:ip_block) { described_class.new(ip: '192.168.0.1') }
  6. it 'combines the IP and prefix into a string' do
  7. result = ip_block.to_log_human_identifier
  8. expect(result).to eq('192.168.0.1/32')
  9. end
  10. end
  11. end