Skip to content

Commit 940551c

Browse files
committed
Rubocop
1 parent c952ed1 commit 940551c

8 files changed

Lines changed: 14 additions & 7 deletions

File tree

app/controllers/active_storage/base_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class ActiveStorage::BaseController < ActionController::Base
22
before_action :enforce_signed_in
33
include ActiveStorage::SetCurrent
4+
45
protect_from_forgery with: :exception
56

67
self.etag_with_template_digest = false

app/models/notification.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class Notification < ApplicationRecord
22
include CommunityRelated
3+
34
belongs_to :user
45

56
delegate :name, to: :community, prefix: true

app/models/pinned_link.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class PinnedLink < ApplicationRecord
22
include MaybeCommunityRelated
3+
34
belongs_to :post, optional: true
45

56
scope :list_includes, lambda {

app/models/reaction_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class ReactionType < ApplicationRecord
22
include CommunityRelated
3+
34
belongs_to :post_type, class_name: 'PostType', optional: true
45

56
validates :name, uniqueness: { scope: [:community_id], case_sensitive: false }

app/models/tag_set.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class TagSet < ApplicationRecord
22
include CommunityRelated
3+
34
has_many :tags
45
has_many :tags_with_paths, class_name: 'TagWithPath'
56
has_many :categories

test/controllers/complaints_controller_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@
33
class ComplaintsControllerTest < ActionDispatch::IntegrationTest
44
test 'should get safety center' do
55
get safety_center_path
6-
assert_response :success
6+
assert_response(:success)
77
end
88

99
test 'safety center should work signed in' do
1010
sign_in users(:basic_user)
1111
get safety_center_path
12-
assert_response :success
12+
assert_response(:success)
1313
end
1414

1515
test 'safety center should work for staff' do
1616
sign_in users(:staff)
1717
get safety_center_path
18-
assert_response :success
18+
assert_response(:success)
1919
end
2020

2121
test 'new report should work signed out' do
2222
get new_complaint_path
23-
assert_response :success
23+
assert_response(:success)
2424
end
2525

2626
test 'new report should work signed in' do
2727
sign_in users(:basic_user)
2828
get new_complaint_path
29-
assert_response :success
29+
assert_response(:success)
3030
end
3131

3232
test 'new report should work for staff' do
3333
sign_in users(:staff)
3434
get new_complaint_path
35-
assert_response :success
35+
assert_response(:success)
3636
end
3737
end

test/controllers/tags_controller_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class TagsControllerTest < ActionController::TestCase
215215
assert_response(:found)
216216
assert_redirected_to tag_path(id: categories(:main).id, tag_id: tags(:base).id)
217217
assert_not_nil assigns(:tag)
218-
assert_equal true, (assigns(:tag).tag_synonyms.none? { |ts| ts.name == 'synonym' })
218+
assert_equal(true, assigns(:tag).tag_synonyms.none? { |ts| ts.name == 'synonym' })
219219
end
220220

221221
test 'should prevent a tag being its own parent' do

test/models/concerns/identity_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class IdentityTest < ActiveSupport::TestCase
44
def setup
55
@klass1 = Class.new do
66
include Identity
7+
78
def initialize(id)
89
super()
910
@id = id
@@ -13,6 +14,7 @@ def initialize(id)
1314

1415
@klass2 = Class.new do
1516
include Identity
17+
1618
def initialize(id)
1719
super()
1820
@id = id

0 commit comments

Comments
 (0)