This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/integration/components/activation-controls-test.js
2021-01-27 12:39:20 +01:00

27 lines
641 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);
},
});
}
);