diff options
author | Nick Thomas <nick@gitlab.com> | 2016-12-20 11:24:44 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-02-01 02:46:07 +0000 |
commit | 6ba149279445bd376e145dab2d7fa58808031692 (patch) | |
tree | 2ffc61951ad484100662682fe381c3387ec6dfa5 /spec/models/pages_domain_spec.rb | |
parent | 7163da6046c2b57f9e9cf3b83959a57763e2f460 (diff) | |
download | gitlab-ce-6ba149279445bd376e145dab2d7fa58808031692.tar.gz |
Update validates_hostname to 1.0.6 to fix a bug in parsing hexadecimal-looking domain names
Diffstat (limited to 'spec/models/pages_domain_spec.rb')
-rw-r--r-- | spec/models/pages_domain_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb index 0cbea5be106..e6a4583a8fb 100644 --- a/spec/models/pages_domain_spec.rb +++ b/spec/models/pages_domain_spec.rb @@ -4,7 +4,7 @@ describe PagesDomain, models: true do describe 'associations' do it { is_expected.to belong_to(:project) } end - + describe :validate_domain do subject { build(:pages_domain, domain: domain) } @@ -20,6 +20,12 @@ describe PagesDomain, models: true do it { is_expected.to be_valid } end + context 'valid hexadecimal-looking domain' do + let(:domain) { '0x12345.com'} + + it { is_expected.to be_valid } + end + context 'no domain' do let(:domain) { nil } |