mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
UX: Display warning message about social logins disabled when 2FA is enabled.
This commit is contained in:
parent
50eb582fb2
commit
d9b4b12694
5 changed files with 50 additions and 8 deletions
|
@ -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
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue