about summary refs log tree commit diff
path: root/spec/models/ip_block_spec.rb
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2023-03-04 11:16:45 -0500
committerGitHub <noreply@github.com>2023-03-04 17:16:45 +0100
commit506b16cf595bf441b9a85db608b6d19e8934fd7d (patch)
treeb3e2a2ef9f519e5298539c684631be6c2726d817 /spec/models/ip_block_spec.rb
parent7f4412eeeb1d35c9345c213b2cdfbbb9ce97dabb (diff)
Pending example models minimal coverage (#23912)
Diffstat (limited to 'spec/models/ip_block_spec.rb')
-rw-r--r--spec/models/ip_block_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/ip_block_spec.rb b/spec/models/ip_block_spec.rb
index 4c4028576..ed5882667 100644
--- a/spec/models/ip_block_spec.rb
+++ b/spec/models/ip_block_spec.rb
@@ -2,6 +2,14 @@
 
 require 'rails_helper'
 
-RSpec.describe IpBlock, type: :model do
-  pending "add some examples to (or delete) #{__FILE__}"
+describe IpBlock do
+  describe 'to_log_human_identifier' do
+    let(:ip_block) { described_class.new(ip: '192.168.0.1') }
+
+    it 'combines the IP and prefix into a string' do
+      result = ip_block.to_log_human_identifier
+
+      expect(result).to eq('192.168.0.1/32')
+    end
+  end
 end