mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
UX: Display warning message about social logins disabled when 2FA is enabled.
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
moduleFor("controller:preferences/second-factor");
|
||||
|
||||
QUnit.test("displayOAuthWarning when OAuth login methods are disabled", assert => {
|
||||
let controller = this.subject({
|
||||
siteSettings: {
|
||||
enable_google_oauth2_logins: false
|
||||
}
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
controller.get('displayOAuthWarning'),
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("displayOAuthWarning when OAuth login methods are enabled", assert => {
|
||||
let controller = this.subject({
|
||||
siteSettings: {
|
||||
enable_google_oauth2_logins: true
|
||||
}
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
controller.get('displayOAuthWarning'),
|
||||
true
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user