mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
18 lines
417 B
Ruby
18 lines
417 B
Ruby
|
require 'rails_helper'
|
||
|
|
||
|
RSpec.describe "Post rake tasks" do
|
||
|
before do
|
||
|
Discourse::Application.load_tasks
|
||
|
end
|
||
|
|
||
|
describe 'remap' do
|
||
|
it 'should remap posts' do
|
||
|
post = Fabricate(:post, raw: "The quick brown fox jumps over the lazy dog")
|
||
|
|
||
|
Rake::Task['posts:remap'].invoke("brown","red")
|
||
|
post.reload
|
||
|
expect(post.raw).to eq('The quick red fox jumps over the lazy dog')
|
||
|
end
|
||
|
end
|
||
|
end
|