blob: 4d4745fd7f49550cc260bdf642d06d4cf9fa1fd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
module TrackUntrackedUploadsHelpers
def uploaded_file
fixture_path = Rails.root.join('spec', 'fixtures', 'rails_sample.jpg')
fixture_file_upload(fixture_path)
end
def ensure_temporary_tracking_table_exists
Gitlab::BackgroundMigration::PrepareUntrackedUploads.new.send(:ensure_temporary_tracking_table_exists)
end
def drop_temp_table_if_exists
ActiveRecord::Base.connection.drop_table(:untracked_files_for_uploads) if ActiveRecord::Base.connection.table_exists?(:untracked_files_for_uploads)
end
end
|