mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Fix RuboCop offense Style/InverseMethods: Use invalid? instead of inverting valid? (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@22153 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -66,11 +66,11 @@ class RepositorySubversionTest < ActiveSupport::TestCase
|
||||
Redmine::Configuration.with 'scm_subversion_path_regexp' => 'file:///svnpath/[a-z]+' do
|
||||
repo = Repository::Subversion.new(:project => @project, :identifier => 'test')
|
||||
repo.url = 'http://foo'
|
||||
assert !repo.valid?
|
||||
assert repo.invalid?
|
||||
assert repo.errors[:url].present?
|
||||
|
||||
repo.url = 'file:///svnpath/foo/bar'
|
||||
assert !repo.valid?
|
||||
assert repo.invalid?
|
||||
assert repo.errors[:url].present?
|
||||
|
||||
repo.url = 'file:///svnpath/foo'
|
||||
@@ -82,7 +82,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
|
||||
Redmine::Configuration.with 'scm_subversion_path_regexp' => 'file:///svnpath/%project%(\.[a-z]+)?' do
|
||||
repo = Repository::Subversion.new(:project => @project, :identifier => 'test')
|
||||
repo.url = 'file:///svnpath/invalid'
|
||||
assert !repo.valid?
|
||||
assert repo.invalid?
|
||||
assert repo.errors[:url].present?
|
||||
|
||||
repo.url = 'file:///svnpath/subproject1'
|
||||
|
||||
Reference in New Issue
Block a user