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/unit/controllers/preferences-second-factor-test.js
Jarek Radosz 1b52cdedb1
DEV: Move more tests into modules (#11119)
Models, services, mixins, utilities, and most of the controllers
2020-11-05 20:23:28 +01:00

18 lines
551 B
JavaScript

import { discourseModule } from "discourse/tests/helpers/qunit-helpers";
import { test } from "qunit";
discourseModule("Unit | Controller | preferences/second-factor", function () {
test("displayOAuthWarning when OAuth login methods are enabled", function (assert) {
const controller = this.owner.lookup(
"controller:preferences/second-factor"
);
controller.setProperties({
siteSettings: {
enable_google_oauth2_logins: true,
},
});
assert.equal(controller.get("displayOAuthWarning"), true);
});
});