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
1a0c4404
Commit
1a0c4404
authored
Jul 28, 2021
by
Andy Soiron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add public_url validation to JC instance_url
parent
93e5974e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
app/models/jira_connect_installation.rb
app/models/jira_connect_installation.rb
+1
-0
spec/models/jira_connect_installation_spec.rb
spec/models/jira_connect_installation_spec.rb
+3
-0
No files found.
app/models/jira_connect_installation.rb
View file @
1a0c4404
...
...
@@ -11,6 +11,7 @@ class JiraConnectInstallation < ApplicationRecord
validates
:client_key
,
presence:
true
,
uniqueness:
true
validates
:shared_secret
,
presence:
true
validates
:base_url
,
presence:
true
,
public_url:
true
validates
:instance_url
,
public_url:
true
,
allow_blank:
true
scope
:for_project
,
->
(
project
)
{
distinct
...
...
spec/models/jira_connect_installation_spec.rb
View file @
1a0c4404
...
...
@@ -15,6 +15,9 @@ RSpec.describe JiraConnectInstallation do
it
{
is_expected
.
to
allow_value
(
'https://test.atlassian.net'
).
for
(
:base_url
)
}
it
{
is_expected
.
not_to
allow_value
(
'not/a/url'
).
for
(
:base_url
)
}
it
{
is_expected
.
to
allow_value
(
'https://test.atlassian.net'
).
for
(
:instance_url
)
}
it
{
is_expected
.
not_to
allow_value
(
'not/a/url'
).
for
(
:instance_url
)
}
end
describe
'.for_project'
do
...
...
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