* Move replacement tests from test/unit/upload_service_test.rb to test/functional/post_replacement_controller_test.rb * Move UploadService::Replacer to PostReplacementProcessor. * Fix a minor bug where if you used the API to replace a post with a file, the replacement would fail unless you passed an empty string for the replacement_url.
9 lines
231 B
Ruby
9 lines
231 B
Ruby
FactoryBot.define do
|
|
factory(:post_replacement) do
|
|
post factory: :post, source: FFaker::Internet.http_url
|
|
original_url { FFaker::Internet.http_url }
|
|
replacement_url { FFaker::Internet.http_url }
|
|
creator
|
|
end
|
|
end
|