Skip to content

Commit 0d0bc94

Browse files
committedSep 10, 2023
#10790 fix rubocop offences
1 parent 3881d16 commit 0d0bc94

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎lib/redmine_privacy_terms.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def valid_terms_url?
2121

2222
wiki_page = project.wiki&.find_page page
2323
return true if wiki_page.present?
24+
25+
false
2426
end
2527

2628
def valid_terms_reject_url?
@@ -36,6 +38,8 @@ def valid_terms_reject_url?
3638

3739
wiki_page = project.wiki&.find_page page
3840
return true if wiki_page.present?
41+
42+
false
3943
end
4044

4145
def terms_url(lang = nil)
@@ -75,7 +79,7 @@ def terms_reject_url(lang = nil)
7579
end
7680

7781
def external_page?(page)
78-
return true if page.include?('http:') || page.include?('https:')
82+
page.include?('http:') || page.include?('https:')
7983
end
8084

8185
private

‎test/test_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class TestCase
2020
include ActionDispatch::TestProcess
2121

2222
def self.prepare
23-
Role.where(id: [1, 2]).each do |r|
23+
Role.where(id: [1, 2]).find_each do |r|
2424
r.permissions << :view_wiki_pages
2525
r.save
2626
end
2727

28-
Project.where(id: [1, 2]).each do |project|
28+
Project.where(id: [1, 2]).find_each do |project|
2929
EnabledModule.create project: project, name: 'wiki'
3030
end
3131
end

0 commit comments

Comments
 (0)
Please sign in to comment.