Skip to content
Snippets Groups Projects
Commit 08333b68 authored by Andy Schoenen's avatar Andy Schoenen :two: Committed by Paul Gascou-Vaillancourt
Browse files

Add public_url validation to JC instance_url

parent 077feeb0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -15,6 +15,9 @@
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment