Add test domains whitelist & fix tests

This commit is contained in:
Alex Sherman 2020-06-03 17:07:19 +05:00
parent 2d89e8124f
commit ba4e256662
3 changed files with 8 additions and 2 deletions

View file

@ -88,7 +88,7 @@ class Nameserver < ApplicationRecord
end
def normalize_attributes
self.hostname = hostname.try(:strip).try(:downcase)
self.hostname = hostname.try(:strip).try(:downcase).gsub(/\.$/, '')
self.ipv4 = Array(ipv4).reject(&:blank?).map(&:strip)
self.ipv6 = Array(ipv6).reject(&:blank?).map(&:strip).map(&:upcase)
end