# frozen_string_literal: true

require 'spec_helper'

describe 'Stdlib::IP::Address::V6::Nosubnet::Full' do
  describe 'accepts ipv6 addresses in full format without subnets' do
    [
      'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210',
      '1080:0:0:0:8:800:200C:417A',
    ].each do |value|
      describe value.inspect do
        it { is_expected.to allow_value(value) }
      end
    end
  end

  describe 'rejects other values' do
    [
      'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60',
      'nope',
      '127.0.0.1',
    ].each do |value|
      describe value.inspect do
        it { is_expected.not_to allow_value(value) }
      end
    end
  end
end
