Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ee97c0d1
Commit
ee97c0d1
authored
Oct 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
308146dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
changelogs/unreleased/33230-undefined-method-terms_of_service_url.yml
...nreleased/33230-undefined-method-terms_of_service_url.yml
+5
-0
lib/gitlab/lets_encrypt.rb
lib/gitlab/lets_encrypt.rb
+4
-0
spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+18
-0
spec/lib/gitlab/lets_encrypt_spec.rb
spec/lib/gitlab/lets_encrypt_spec.rb
+12
-0
No files found.
changelogs/unreleased/33230-undefined-method-terms_of_service_url.yml
0 → 100644
View file @
ee97c0d1
---
title
:
Fix 500 error on clicking to LetsEncrypt Terms of Service
merge_request
:
18263
author
:
type
:
fixed
lib/gitlab/lets_encrypt.rb
View file @
ee97c0d1
...
...
@@ -5,5 +5,9 @@ module Gitlab
def
self
.
enabled?
Gitlab
::
CurrentSettings
.
lets_encrypt_terms_of_service_accepted
end
def
self
.
terms_of_service_url
::
Gitlab
::
LetsEncrypt
::
Client
.
new
.
terms_of_service_url
end
end
end
spec/controllers/admin/application_settings_controller_spec.rb
View file @
ee97c0d1
...
...
@@ -143,4 +143,22 @@ describe Admin::ApplicationSettingsController do
expect
(
response
).
to
redirect_to
(
admin_runners_path
)
end
end
describe
'GET #lets_encrypt_terms_of_service'
do
include
LetsEncryptHelpers
before
do
sign_in
(
admin
)
stub_lets_encrypt_client
end
subject
{
get
:lets_encrypt_terms_of_service
}
it
'redirects the user to the terms of service page'
do
subject
expect
(
response
).
to
redirect_to
(
"https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf"
)
end
end
end
spec/lib/gitlab/lets_encrypt_spec.rb
View file @
ee97c0d1
...
...
@@ -24,4 +24,16 @@ describe ::Gitlab::LetsEncrypt do
it
{
is_expected
.
to
eq
(
false
)
}
end
end
describe
'.terms_of_service_url'
do
before
do
stub_lets_encrypt_client
end
subject
{
described_class
.
terms_of_service_url
}
it
'returns the url'
do
is_expected
.
to
eq
(
"https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf"
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment