added strong params to comments_controller to prevent users from editing attributes which are not intended to be edited, also created specs to test this behaviour
This commit is contained in:

committed by
Sebastian Serth

parent
b98c37ae64
commit
4615a49e62
@ -13,7 +13,7 @@ FactoryBot.define do
|
||||
factory :rfc_with_comment, class: 'RequestForComment' do
|
||||
after(:create) do |rfc|
|
||||
rfc.file = rfc.submission.files.first
|
||||
Comment.create(file: rfc.file, user: rfc.user, text: "comment for rfc #{rfc.question}")
|
||||
Comment.create(file: rfc.file, user: rfc.user, row: 1, text: "comment for rfc #{rfc.question}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user