Pass exercise object instead of id to reject_illegal_file_attributes

This commit is contained in:
tobias.kantusch
2021-04-26 15:27:32 +02:00
committed by Sebastian Serth
parent b3c110cead
commit 36cacc2330
4 changed files with 7 additions and 6 deletions

View File

@ -13,7 +13,7 @@ describe FileParameters do
describe '#reject_illegal_file_attributes!' do
def file_accepted?(file)
files = [[0, FactoryBot.attributes_for(:file, context: hello_world, file_id: file.id)]]
filtered_files = controller.send(:reject_illegal_file_attributes, hello_world.id, files)
filtered_files = controller.send(:reject_illegal_file_attributes, hello_world, files)
files.eql?(filtered_files)
end