mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Infinite loop when poll step is zero (#5380)
* Fix infinite loop when poll step is zero * Add test for step minimum and for breaking test * Remove trailing spaces (eslint) * Remove extra space (eslint) * Removed test call .twice
This commit is contained in:
parent
3f8d0c5c94
commit
ab22c8cad4
5 changed files with 33 additions and 2 deletions
|
@ -196,6 +196,10 @@ test("number pollOutput", function(assert) {
|
|||
controller.set("publicPoll", true);
|
||||
|
||||
assert.equal(controller.get("pollOutput"), "[poll type=number min=1 max=20 step=2 public=true]\n[/poll]", "it should return the right output");
|
||||
|
||||
controller.set("pollStep", 0);
|
||||
|
||||
assert.equal(controller.get("pollOutput"), "[poll type=number min=1 max=20 step=1 public=true]\n[/poll]", "it should return the right output");
|
||||
});
|
||||
|
||||
test("regular pollOutput", function(assert) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue