mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 12:38:07 +08:00
FIX: Handle BBCode in migrate_to_s3
task as well.
This commit is contained in:
@ -41,4 +41,14 @@ RSpec.describe DbHelper do
|
||||
expect(post.reload.cooked).to eq('test')
|
||||
end
|
||||
end
|
||||
|
||||
describe ".regexp_replace" do
|
||||
it "should remap columns correctly" do
|
||||
post = Fabricate(:post, raw: "this is a [img]test[/img] post")
|
||||
|
||||
DbHelper.regexp_replace("\\[img\\]test\\[/img\\]", "[img]something[/img]")
|
||||
|
||||
expect(post.reload.raw).to include("[img]something[/img]")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user