diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 21:08:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 21:08:49 +0000 |
commit | cf1d4237a4f226ba2deed26240544da0675a41e5 (patch) | |
tree | 926a71b9279659bc52db0187b463603934718bf2 /spec/models/error_tracking | |
parent | 0ac82f99553ce12009970a14c0afc02d1f6515bb (diff) | |
download | gitlab-ce-cf1d4237a4f226ba2deed26240544da0675a41e5.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/error_tracking')
-rw-r--r-- | spec/models/error_tracking/project_error_tracking_setting_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/error_tracking/project_error_tracking_setting_spec.rb b/spec/models/error_tracking/project_error_tracking_setting_spec.rb index 41630c71f21..e81480ab88f 100644 --- a/spec/models/error_tracking/project_error_tracking_setting_spec.rb +++ b/spec/models/error_tracking/project_error_tracking_setting_spec.rb @@ -19,6 +19,19 @@ describe ErrorTracking::ProjectErrorTrackingSetting do it { is_expected.to allow_value("http://gitlab.com/api/0/projects/project1/something").for(:api_url) } it { is_expected.not_to allow_values("http://gitlab.com/api/0/projects/project1/something€").for(:api_url) } + it 'disallows non-booleans in enabled column' do + is_expected.not_to allow_value( + nil + ).for(:enabled) + end + + it 'allows booleans in enabled column' do + is_expected.to allow_value( + true, + false + ).for(:enabled) + end + it 'rejects invalid api_urls' do is_expected.not_to allow_values( "https://replaceme.com/'><script>alert(document.cookie)</script>", # unsafe |