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:
Go MAEDA
2023-03-25 01:51:31 +00:00
parent 32d2b1c42f
commit c1c9a50397
8 changed files with 16 additions and 16 deletions

View File

@@ -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'