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 a5156d18ff
DEV: Modernize controller unit tests (#17412)
Aligns controller tests with the Ember standard, by using `module` and `setupTest` instead of our custom `discourseModule`)
2022-10-14 13:15:58 +02:00

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);
});
});