mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 10:54:41 +08:00
FIX: prevent pollception
This commit is contained in:
@ -65,6 +65,15 @@ describe PostsController do
|
||||
expect(json["polls"]).to be
|
||||
end
|
||||
|
||||
it "prevents pollception" do
|
||||
xhr :post, :create, { title: title, raw: "[poll name=1]\n- A\n[poll name=2]\n- B\n- C\n[/poll]\n- D\n[/poll]" }
|
||||
expect(response).to be_success
|
||||
json = ::JSON.parse(response.body)
|
||||
expect(json["cooked"]).to match("data-poll-")
|
||||
expect(json["polls"]["1"]).to_not be
|
||||
expect(json["polls"]["2"]).to be
|
||||
end
|
||||
|
||||
describe "edit window" do
|
||||
|
||||
describe "within the first 5 minutes" do
|
||||
|
Reference in New Issue
Block a user