Aligns controller tests with the Ember standard, by using `module` and `setupTest` instead of our custom `discourseModule`)
18 lines
553 B
JavaScript
18 lines
553 B
JavaScript
import { module, test } from "qunit";
|
|
import { setupTest } from "ember-qunit";
|
|
|
|
module("Unit | Controller | preferences/second-factor", function (hooks) {
|
|
setupTest(hooks);
|
|
|
|
test("displayOAuthWarning when OAuth login methods are enabled", function (assert) {
|
|
const siteSettings = this.owner.lookup("service:site-settings");
|
|
siteSettings.enable_google_oauth2_logins = true;
|
|
|
|
const controller = this.owner.lookup(
|
|
"controller:preferences/second-factor"
|
|
);
|
|
|
|
assert.strictEqual(controller.displayOAuthWarning, true);
|
|
});
|
|
});
|