mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:31:18 +08:00
FEATURE: Export topics to markdown (#15615)
* FEATURE: Export topics to markdown The route `/raw/TOPIC_ID` will now export whole topics (paginated to 100 posts) in a markdown format. See https://meta.discourse.org/t/-/152185/12
This commit is contained in:

committed by
GitHub

parent
2909b8b820
commit
3f91c8835b
@ -1888,6 +1888,16 @@ describe PostsController do
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to eq("123456789")
|
||||
end
|
||||
|
||||
it "can show whole topics" do
|
||||
topic = Fabricate(:topic)
|
||||
post = Fabricate(:post, topic: topic, post_number: 1, raw: "123456789")
|
||||
post_2 = Fabricate(:post, topic: topic, post_number: 2, raw: "abcdefghij")
|
||||
post.save
|
||||
get "/raw/#{topic.id}"
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include("123456789", "abcdefghij")
|
||||
end
|
||||
end
|
||||
|
||||
describe '#short_link' do
|
||||
|
Reference in New Issue
Block a user