Fix Rubocop offenses

This commit is contained in:
Sebastian Serth
2023-06-11 20:46:45 +02:00
parent 5a10e04121
commit bcdc71021e
19 changed files with 39 additions and 39 deletions

View File

@@ -6,15 +6,15 @@ module CodeOcean
FactoryBot.define do
factory :file, class: 'CodeOcean::File' do
content { '' }
association :context, factory: :submission
association :file_type, factory: :dot_rb
context factory: :submission
file_type factory: :dot_rb
hidden { false }
name { SecureRandom.hex }
read_only { false }
role { 'main_file' }
trait(:image) do
association :file_type, factory: :dot_png
file_type factory: :dot_png
name { 'poster' }
native_file { Rack::Test::UploadedFile.new(Rails.root.join('db/seeds/audio_video/poster.png'), 'image/png') }
end
@@ -22,8 +22,8 @@ module CodeOcean
factory :test_file, class: 'CodeOcean::File' do
content { '' }
association :context, factory: :dummy
association :file_type, factory: :dot_rb
context factory: :dummy
file_type factory: :dot_rb
hidden { true }
name { SecureRandom.hex }
read_only { true }