Previously, when both `enable_local_logins` and `email_editable` are disabled still user can change the email in user activation page.
26 lines
615 B
JavaScript
26 lines
615 B
JavaScript
import componentTest, {
|
|
setupRenderingTest,
|
|
} from "discourse/tests/helpers/component-test";
|
|
import {
|
|
discourseModule,
|
|
queryAll,
|
|
} from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
discourseModule("Integration | Component | activation-controls", function (
|
|
hooks
|
|
) {
|
|
setupRenderingTest(hooks);
|
|
|
|
componentTest("hides change email button", {
|
|
template: `{{activation-controls}}`,
|
|
beforeEach() {
|
|
this.siteSettings.enable_local_logins = false;
|
|
this.siteSettings.email_editable = false;
|
|
},
|
|
|
|
test(assert) {
|
|
assert.equal(queryAll("button.edit-email").length, 0);
|
|
},
|
|
});
|
|
});
|