summaryrefslogtreecommitdiff
path: root/spec/models/clusters/cluster_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/clusters/cluster_spec.rb')
-rw-r--r--spec/models/clusters/cluster_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb
index 92ce2b0999a..3feed4e9718 100644
--- a/spec/models/clusters/cluster_spec.rb
+++ b/spec/models/clusters/cluster_spec.rb
@@ -265,12 +265,12 @@ describe Clusters::Cluster do
it { is_expected.to be_valid }
end
- context 'when cluster has an invalid domain' do
- let(:cluster) { build(:cluster, domain: 'not-valid-domain') }
+ context 'when cluster is not a valid hostname' do
+ let(:cluster) { build(:cluster, domain: 'http://not.a.valid.hostname') }
it 'should add an error on domain' do
expect(subject).not_to be_valid
- expect(subject.errors[:domain].first).to eq('is not a fully qualified domain name')
+ expect(subject.errors[:domain].first).to eq('contains invalid characters (valid characters: [a-z0-9\\-])')
end
end