FIX: Set default value for poll result field (#10044)

This commit is contained in:
Bianca Nenciu 2020-07-07 03:16:21 +03:00 committed by GitHub
parent 1f5cecaf28
commit 40de535224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -350,6 +350,7 @@ export default Controller.extend({
pollStep: 1,
autoClose: false,
chartType: BAR_CHART_TYPE,
pollResult: this.alwaysPollResult,
pollGroups: null,
date: moment()
.add(1, "day")

View File

@ -320,6 +320,11 @@ test("staff_only option is not present for non-staff", function(assert) {
);
});
test("poll result is always by default", function(assert) {
const controller = this.subject();
assert.equal(controller.pollResult, "always");
});
test("staff_only option is present for staff", function(assert) {
const controller = this.subject();
controller.currentUser = { staff: true };