FIX: preference page error when badges are disabled

This commit is contained in:
Neil Lalonde
2018-04-09 14:27:00 -04:00
parent 1b351a3355
commit d7ea6f93e7
2 changed files with 24 additions and 4 deletions

View File

@@ -121,3 +121,19 @@ QUnit.test("second factor", assert => {
);
});
});
acceptance("User Preferences when badges are disabled", {
loggedIn: true,
settings: {
enable_badges: false
}
});
QUnit.test("visit my preferences", assert => {
visit("/u/eviltrout/preferences");
andThen(() => {
assert.ok($('body.user-preferences-page').length, "has the body class");
assert.equal(currentURL(), '/u/eviltrout/preferences/account', "defaults to account tab");
assert.ok(exists('.user-preferences'), 'it shows the preferences');
});
});