diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-04-11 09:29:07 +0300 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-04-11 09:29:07 +0300 |
commit | d119d3d1b25aac661e6251addf87b280bd37f0c5 (patch) | |
tree | aeaf0d9503326ec7f51968e8d1de48d83ce90503 /spec/controllers/projects | |
parent | 79bf4bdaad438dc0f82771b102f3c07225a428da (diff) |
Align UrlValidator to validate_url gem implementation.
Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.
Make use of the options attribute of the parent class ActiveModel::EachValidator.
Add more options: allow_nil, allow_blank, message.
Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r-- | spec/controllers/projects/mirrors_controller_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/controllers/projects/mirrors_controller_spec.rb b/spec/controllers/projects/mirrors_controller_spec.rb index f2b73956e8d..3ababe18055 100644 --- a/spec/controllers/projects/mirrors_controller_spec.rb +++ b/spec/controllers/projects/mirrors_controller_spec.rb @@ -79,7 +79,7 @@ describe Projects::MirrorsController do do_put(project, remote_mirrors_attributes: remote_mirror_attributes) expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-push-remote-settings')) - expect(flash[:alert]).to match(/Only allowed protocols are/) + expect(flash[:alert]).to match(/Only allowed schemes are/) end it 'does not create a RemoteMirror object' do |