summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/base/test/unit/test_bug434810.js
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/base/test/unit/test_bug434810.js')
-rw-r--r--comm/mailnews/base/test/unit/test_bug434810.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/comm/mailnews/base/test/unit/test_bug434810.js b/comm/mailnews/base/test/unit/test_bug434810.js
new file mode 100644
index 0000000000..f41eea82d9
--- /dev/null
+++ b/comm/mailnews/base/test/unit/test_bug434810.js
@@ -0,0 +1,27 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Test of setup of localMailFolders
+
+function run_test() {
+ localAccountUtils.loadLocalMailAccount();
+
+ var rootFolder = localAccountUtils.incomingServer.rootFolder;
+
+ var msgProps = Services.strings.createBundle(
+ "chrome://messenger/locale/messenger.properties"
+ );
+
+ var expectedFolders = ["Inbox"]; // Inbox hard-coded in LocalAccountUtils.jsm
+
+ // These two MailNews adds by default
+ expectedFolders.push(msgProps.GetStringFromName("outboxFolderName"));
+ expectedFolders.push(msgProps.GetStringFromName("trashFolderName"));
+
+ Assert.equal(rootFolder.numSubFolders, expectedFolders.length);
+ for (var i = 0; i < expectedFolders.length; ++i) {
+ Assert.ok(rootFolder.containsChildNamed(expectedFolders[i]));
+ }
+ Assert.ok(rootFolder.isAncestorOf(localAccountUtils.inboxFolder));
+}