debian-mirror-gitlab/spec/views/projects/pages_domains/show.html.haml_spec.rb

36 lines
1.1 KiB
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
describe 'projects/pages_domains/show' do
let(:project) { create(:project, :repository) }
before do
assign(:project, project)
2020-04-22 19:07:51 +05:30
assign(:domain, domain.present)
2020-01-01 13:55:28 +05:30
stub_pages_setting(external_https: true)
2019-12-04 20:38:33 +05:30
end
context 'when auto_ssl is enabled' do
context 'when domain is disabled' do
let(:domain) { create(:pages_domain, :disabled, project: project, auto_ssl_enabled: true) }
it 'shows verification warning' do
render
expect(rendered).to have_content("A Let's Encrypt SSL certificate can not be obtained until your domain is verified.")
end
end
context 'when certificate is absent' do
let(:domain) { create(:pages_domain, :without_key, :without_certificate, project: project, auto_ssl_enabled: true) }
it 'shows alert about time of obtaining certificate' do
render
expect(rendered).to have_content("GitLab is obtaining a Let's Encrypt SSL certificate for this domain. This process can take some time. Please try again later.")
end
end
end
end