mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Allow multiple hyphens in host (#10078)
* FIX: Allow multiple hyphens in host * FIX: added spec for multiple hyphens
This commit is contained in:
@ -52,6 +52,12 @@ describe EmbeddableHost do
|
||||
expect(eh.host).to eq('discourse.localhost')
|
||||
end
|
||||
|
||||
it "supports multiple hyphens" do
|
||||
eh = EmbeddableHost.new(host: 'deploy-preview-1--example.example.app')
|
||||
expect(eh).to be_valid
|
||||
expect(eh.host).to eq('deploy-preview-1--example.example.app')
|
||||
end
|
||||
|
||||
it "rejects misspellings of localhost" do
|
||||
eh = EmbeddableHost.new(host: 'alocalhost')
|
||||
expect(eh).not_to be_valid
|
||||
|
Reference in New Issue
Block a user