// polyfill fetch global.fetch = global.fetch || require('isomorphic-fetch') const assert = require('assert') const extend = require('xtend') const rp = require('request-promise') const nock = require('nock') const configManagerGen = require('../lib/mock-config-manager') describe('config-manager', function() { var configManager beforeEach(function() { configManager = configManagerGen() }) describe('#setConfig', function() { it('should set the config key', function () { var testConfig = { provider: { type: 'rpc', rpcTarget: 'foobar' } } configManager.setConfig(testConfig) var result = configManager.getData() assert.equal(result.config.provider.type, testConfig.provider.type) assert.equal(result.config.provider.rpcTarget, testConfig.provider.rpcTarget) }) it('setting wallet should not overwrite config', function() { var testConfig = { provider: { type: 'rpc', rpcTarget: 'foobar' }, } configManager.setConfig(testConfig) var testWallet = { name: 'this is my fake wallet' } configManager.setWallet(testWallet) var result = configManager.getData() assert.equal(result.wallet.name, testWallet.name, 'wallet name is set') assert.equal(result.config.provider.rpcTarget, testConfig.provider.rpcTarget) testConfig.provider.type = 'something else!' configManager.setConfig(testConfig) result = configManager.getData() assert.equal(result.wallet.name, testWallet.name, 'wallet name is set') assert.equal(result.config.provider.rpcTarget, testConfig.provider.rpcTarget) assert.equal(result.config.provider.type, testConfig.provider.type) }) }) describe('wallet nicknames', function() { it('should return null when no nicknames are saved', function() { var nick = configManager.nicknameForWallet('0x0') assert.equal(nick, null, 'no nickname returned') }) it('should persist nicknames', function() { var account = '0x0' var nick1 = 'foo' var nick2 = 'bar' configManager.setNicknameForWallet(account, nick1) var result1 = configManager.nicknameForWallet(account) assert.equal(result1, nick1) configManager.setNicknameForWallet(account, nick2) var result2 = configManager.nicknameForWallet(account) assert.equal(result2, nick2) }) }) describe('rpc manipulations', function() { it('changing rpc should return a different rpc', function() { var firstRpc = 'first' var secondRpc = 'second' configManager.setRpcTarget(firstRpc) var firstResult = configManager.getCurrentRpcAddress() assert.equal(firstResult, firstRpc) configManager.setRpcTarget(secondRpc) var secondResult = configManager.getCurrentRpcAddress() assert.equal(secondResult, secondRpc) }) }) describe('transactions', function() { beforeEach(function() { configManager.setTxList([]) }) describe('#getTxList', function() { it('when new should return empty array', function() { var result = configManager.getTxList() assert.ok(Array.isArray(result)) assert.equal(result.length, 0) }) }) describe('#setTxList', function() { it('saves the submitted data to the tx list', function() { var target = [{ foo: 'bar' }] configManager.setTxList(target) var result = configManager.getTxList() assert.equal(result[0].foo, 'bar') }) }) }) }) Coding style and whitespace cleanup.Matthew Barnes2011-09-04521-11588/+16877 * Updated Spanish translationJorge González2011-09-041-92/+103 * Fix wrong gconf value translations in az, eu, hi, kn, ml, ne, sq, te, xh. Fix...Andre Klapper2011-09-049-29/+12 * Add page explaining how to use address books as data source in LibreOffice. F...Andre Klapper2011-09-041-0/+35 * Updated Spanish translationJorge González2011-09-031-5/+16 * Updated Spanish translationJorge González2011-09-031-102/+121 * Add page how to change keyboard shortcutsAndre Klapper2011-09-031-0/+31 * User Docs: Add info how to write a good bug reportAndre Klapper2011-09-031-3/+5 * Add "Contact Maps" to the configure summary.Matthew Barnes2011-09-031-0/+1 * User Docs: Improve wording and add hint about IRC applicationAndre Klapper2011-09-031-2/+2 * User Docs: Fix order of Outlook import stepsAndre Klapper2011-09-031-5/+6 * User Docs: fixed logo in title bar issueTiffany Antopolski2011-09-031-2/+3 * User Docs: Remove preceding './' from image path in <title> in the hope of li...Andre Klapper2011-09-031-1/+1 * Consolidate MailFolderCache signal handlers.Matthew Barnes2011-09-022-162/+177 * Updated Traditional Chinese translation(Hong Kong and Taiwan)Cheng-Chia Tseng2011-09-022-2476/+2468 * Updated French translationBruno Brouard2011-09-021-4747/+4299 * Updated Spanish translationDaniel Mustieles2011-09-021-99/+63 * Updated Swedish translationDaniel Nylander2011-09-011-407/+411 * Bug 657836 - Work around g_unix_signal API changes.Matthew Barnes2011-09-011-1/+5 * Create tar.xz files for 'make dist' onlyMilan Crha2011-08-311-1/+1 * Bug 657765 - Explicitly link libgnomecanvas against libmFrederic Peters2011-08-311-1/+2 * Miscellaneous cleanups.Matthew Barnes2011-08-3123-355/+403 * Updated Spanish translationJorge González2011-08-311-59/+59 * Fix default in image-inline help string.Matthew Barnes2011-08-301-1/+1 * Disable inline-image plugin by default.Matthew Barnes2011-08-301-1/+1 * Updated Spanish translationJorge González2011-08-301-117/+96 * Updated Indonesian translationAndika Triwidada2011-08-291-1773/+1274 * Post-release version bump.Matthew Barnes2011-08-291-1/+1 * NEWS update for 3.1.90 release.EVOLUTION_3_1_90_FIXEDMatthew Barnes2011-08-291-0/+98 * Fix build break in libeshell.Matthew Barnes2011-08-291-0/+1 * Updated galician translationsFran Dieguez2011-08-281-224/+231 * Updated Galician translationsFran Dieguez2011-08-281-305/+307 * Updated Spanish translationJorge González2011-08-281-38/+64 * Updated Spanish translationJorge González2011-08-281-59/+82 * Updated Russian translationYuri Myasoedov2011-08-281-4915/+3963 * Fix enum generation problems in glib-gen.mak.Matthew Barnes2011-08-273-9/+12 * Updated Japanese translationOKANO Takayoshi2011-08-271-2372/+2540 * Updated Spanish translationDaniel Mustieles2011-08-271-182/+187 * Updated Spanish translationJorge González2011-08-271-24907/+11051 * Updated Spanish translationJorge González2011-08-271-11009/+24923 * Stick Account Editor widgets at the top, like it used to before gtk3Milan Crha2011-08-261-41/+72 * [mail-to-task] Uses incorrect function to free array of message uidsMilan Crha2011-08-261-5/+5 * Changing source in CompEditor blocks UIMilan Crha2011-08-265-114/+289 * Updated Norwegian bokmål translationKjartan Maraas2011-08-261-152/+153 * Bug #655551 - [mail-to-task] Pick organizer based on selected folder's storeMilan Crha2011-08-261-4/+11 * Bug #655549 - [mail-to-task] Ignores cancel of source select dialogMilan Crha2011-08-261-0/+2 * Bug #657310 - Crash when editing transport-only accountsMilan Crha2011-08-262-5/+13 * Bug #657396 - Rename Alarms tab to Reminders in preferencesMilan Crha2011-08-261-1/+1 * Bug #362366 - Dragging selected folder to message pane duplicates messagesMilan Crha2011-08-261-0/+13 * Bug #655708 - Unreadable tooltip for Memo/TaskMilan Crha2011-08-262-2/+16 * Fix two TODOs now that UI bug 655629 is fixedAndre Klapper2011-08-262-6/+4 * Bug #655629 - "Path:" label for spool file should be "File:" labelMilan Crha2011-08-262-0/+5 * Bug #655490 - Location chooser dialog for Weather calendar is too smallMilan Crha2011-08-261-1/+1 * Bug #655419 - "Save as iCalendar" misses mnemonicMilan Crha2011-08-262-2/+2 * User docs: Move TODO outside of sentence for translatorsAndre Klapper2011-08-251-1/+2 * User docs: Add info about strftime variablesAndre Klapper2011-08-252-5/+6 * Add explicit bug ID for TODO about missing Headers option in IMAP+Andre Klapper2011-08-251-1/+1 * User docs: Add explicit bug ID for TODO about UI issuesAndre Klapper2011-08-251-1/+1 * Bug #650839 - Add option for alarms into calendar preferencesMilan Crha2011-08-251-0/+42 * User docs: Fix wrong meeting invitation instructions; explain Inherit Reminde...Andre Klapper2011-08-251-3/+6 * User docs: Reorder buttons as shown in UIAndre Klapper2011-08-251-2/+2 * User docs: Warn about order of filters. Fixes bug #602906Andre Klapper2011-08-252-16/+20 * User docs: Fix copy and paste typoAndre Klapper2011-08-251-2/+2 * User Docs: Remove plenkingAndre Klapper2011-08-251-2/+2 * User docs: Add introduction sentence for switcher. Fixes bug #657028Andre Klapper2011-08-251-1/+4 * Updated Norwegian bokmål translationKjartan Maraas2011-08-251-306/+310 * Updated Spanish translationJorge González2011-08-251-147/+231 * Updated Spanish translationDaniel Mustieles2011-08-251-55/+58 * Updated Spanish translationDaniel Mustieles2011-08-251-114/+116 * Add image mimetype to user docAndre Klapper2011-08-251-8/+8 * Add image mimetype to user docAndre Klapper2011-08-251-3/+7 * Update a few fuzzy strings in Czech help translationAndre Klapper2011-08-251-15082/+1827 * Fix small typo in user docsAndre Klapper2011-08-251-1/+1 * Sync two strings in user docs to decrease work for translatorsAndre Klapper2011-08-252-4/+4 * Link to POP3 Extensions RFC to fix bug 317830Andre Klapper2011-08-241-2/+2 * Update user docs as per latest Preferences UI changes, see bug 655666Andre Klapper2011-08-242-3/+6 * Update user docs now that bug 655666 is fixedAndre Klapper2011-08-241-4/+3 * Bug #652914 - IMAP: moving mail puts a copy into real Trash tooMilan Crha2011-08-241-12/+85 * Updated Swedish translationDaniel Nylander2011-08-241-2055/+1473 * [l10n] Updated German help translation screen-shotsChristian Kirbach2011-08-241-8136/+4039 * Updated Spanish translationJorge González2011-08-241-120/+123 * Bug #655666 - Split task preferences into its own tabMilan Crha2011-08-233-92/+118 * Updated Serbian translationМирослав Николић2011-08-232-9433/+8803 * Very slow filling of EMSubscriptionEditor tree viewMilan Crha2011-08-231-7/+21 * Updated Tamil translationDr.T.Vasudevan2011-08-231-4704/+4881 * [l10n] Updated German translationChristian Kirbach2011-08-231-1780/+1859 * Updated Spanish screenshot, fixes bug #657102Jorge González2011-08-231-0/+0 * Add translator comment for screenshot in docsAndre Klapper2011-08-231-1/+2 * Updated Spanish translationJorge González2011-08-231-9791/+313 * Bug #652092 - 'Mark messages as read' doesn't work with search folderMilan Crha2011-08-221-7/+15 * Updated Spanish translationJorge González2011-08-222-45/+36 * update Punjabi TranslationA S Alam2011-08-211-5335/+6016 * Updated Spanish translationJorge González2011-08-201-0/+0 * Updated Spanish translationJorge González2011-08-201-0/+0 * Updated Spanish translationJorge González2011-08-202-122/+106 * Updated Spanish translationDaniel Mustieles2011-08-201-5/+5 * Updated Spanish translationJorge González2011-08-202-1183/+1171 * Updated Indonesian translationAndika Triwidada2011-08-201-269/+156 * Cannot add folder to previously saved Search folderMilan Crha2011-08-191-13/+23 * plugin-mono: Remove Camel.cs and Evolution.csMatthew Barnes2011-08-192-1368/+0 * Update user doc instructions now that UI bug 655492 is fixedAndre Klapper2011-08-191-3/+3 * Updated Indonesian translationAndika Triwidada2011-08-191-7930/+7107 * Capitalize tab header as all others are capitalized tooAndre Klapper2011-08-191-1/+1 * Update user doc instructions now that UI bug 655494 is fixedAndre Klapper2011-08-192-8/+3 * Bug #651741 - Find in text message doesn't warn about no matching foundMilan Crha2011-08-192-1/+5 * Bug #651633 - Hidden task/memo sidebar always automagically re-appearsMilan Crha2011-08-191-0/+19 * Invalidate region by one more pixel in width and heightMilan Crha2011-08-191-2/+2 * Bug #656733 - GUI no longer allows for non-default ports for emailMilan Crha2011-08-191-10/+0 * Update EMailBrowser actions when MessageList reloads.Matthew Barnes2011-08-192-1/+13 * Bug #656810 - Too strict checking for validity of received calendarsMilan Crha2011-08-181-4/+18 * Do not show IM icons, a workaround till bug #473862 is fixedMilan Crha2011-08-181-0/+5 * Bug 656720 - Exclude NNTP stores from Create Folder dialogMatthew Barnes2011-08-183-18/+42 * e_mail_store_foreach(): Take an EMailSession parameter.Matthew Barnes2011-08-185-20/+35 * Use new CamelService:display-name property.Matthew Barnes2011-08-1815-107/+71 * Bug 656718 - Runtime warning in folder_tree_get_folder_info_cb()Matthew Barnes2011-08-181-13/+16 * Change license of Czech Help translation as per https://mail.gnome.org/archiv...Andre Klapper2011-08-181-1/+1 * Bug #656723 - Forgets 'Use secure connection' setting during account configur...Milan Crha2011-08-171-8/+7 * Bug #656622 - 'Check for supported types' fails againMilan Crha2011-08-171-3/+8 * Bug #656722 - Incorrect prototype of notify:: signal callbackMilan Crha2011-08-173-21/+13 * Updated Galician translationsFran Dieguez2011-08-171-1245/+1249 * Simplify em_config_target_new_account_update_settings().Matthew Barnes2011-08-171-16/+4 * Updated Norwegian bokmål translation.Kjartan Maraas2011-08-161-1673/+1656 * Updated Spanish translationJorge González2011-08-161-191/+192 * Bug #656620 - Account editor doesn't update on settings changeMilan Crha2011-08-163-5/+43 * Using of uninitialized memory in em-folder-tree-model.c:store_info_freeMilan Crha2011-08-161-1/+1 * Adapt to new CamelSubscribable interface.Matthew Barnes2011-08-1610-53/+77 * Notify about all newly received messages since the last checkMilan Crha2011-08-161-3/+5 * Bug #655254 - Cropped Junk settings textMilan Crha2011-08-162-4/+2 * Bug #656258 - Critical runtime warning on comp-editor closeMilan Crha2011-08-161-0/+7 * EMAccountEditor: Utilize CamelSettings.Matthew Barnes2011-08-153-635/+488 * imap-headers: Adapt to CamelSettings.Matthew Barnes2011-08-151-79/+74 * EMConfigTargetAccount: Add CamelSettings member.Matthew Barnes2011-08-152-2/+12 * MailAccountView: Adapt to URL parameter renames.Matthew Barnes2011-08-151-38/+36 * online-accounts: Adapt to URL parameter renames.Matthew Barnes2011-08-151-4/+6 * Drop some ancient GroupWise account migration.Matthew Barnes2011-08-151-91/+0 * EPortEntry: Add a "security-method" property.Matthew Barnes2011-08-152-75/+138 * EMailLocal: Change how we set "need-summary-check".Matthew Barnes2011-08-151-1/+4 * EMailSession: Configure settings when adding services.Matthew Barnes2011-08-151-0/+29 * Add migration routine for CamelURL param renames.Matthew Barnes2011-08-151-0/+241 * Bug #655942 - Shows 'Storing folder...' when deleting a local folderMilan Crha2011-08-151-1/+19 * Bug #656537 - Fix mallard relaxng validation errors in help pagesAlexandre Rostovtsev2011-08-1521-39/+41 * Updated Spanish translationDaniel Mustieles2011-08-151-1/+2 * Updated Spanish translationDaniel Mustieles2011-08-151-89/+86 * Updated Spanish translationJorge González2011-08-151-68/+60 * post release version bumpChenthill Palanisamy2011-08-151-1/+1 * News update for 3.1.5 releaseEVOLUTION_3_1_5Chenthill Palanisamy2011-08-151-0/+78 * Updated Spanish translationJorge González2011-08-141-133/+171 * Updated Lithuanian translationAurimas Černius2011-08-141-6670/+5847 * Coding style and whitespace cleanup.Matthew Barnes2011-08-1388-1438/+2681 * Updated Spanish translationJorge González2011-08-131-225/+223 * Updated Traditional Chinese translation(Hong Kong and Taiwan)Chao-Hsiung Liao2011-08-132-1656/+1672 * Bug #656290 - "Always carbon-copy (cc) to:" option not honoredMilan Crha2011-08-121-0/+48 * Bug #656267 - Checking for auth types doesn't work properlyMilan Crha2011-08-122-14/+33 * Bug #655957 - Current account / all accounts search changes columnMilan Crha2011-08-121-1/+5 * Bug #645476 - Message list unnecessarily scrolls back to selected rowMilan Crha2011-08-121-1/+0 * git.mk: Add support for mallard.Matthew Barnes2011-08-112-2/+17 * Bug #656133 - Mail-local not initialized when adding/editing accountMilan Crha2011-08-111-0/+4 * Bug #655843 - Copy to calendar doesn't add timezone informationJames Bottomley2011-08-111-0/+30 * EConfig: Broadcast abort/commit events by way of signals.Matthew Barnes2011-08-1112-77/+102 * EMFolderTreeModel: Avoid a potential refcount crash.Matthew Barnes2011-08-101-1/+7 * Fix duplicated section IDAndre Klapper2011-08-101-2/+2 * Bug #655944 - Import dialog is not showing operation progressMilan Crha2011-08-102-34/+55 * Updated Spanish translationDaniel Mustieles2011-08-101-265/+275 * Gtk-Doc updates.Matthew Barnes2011-08-104-10/+17 * EMAccountEditor: Simplify real junk/trash folder selection.Matthew Barnes2011-08-101-19/+21 * EMFolderSelectionButton: Add an "account" property.Matthew Barnes2011-08-102-34/+118 * EMFolderSelector: Add a "model" construct-only property.Matthew Barnes2011-08-107-22/+107 * Add em_folder_tree_new_with_model().Matthew Barnes2011-08-102-1/+18 * EMFolderTree: Clean up initialization logic.Matthew Barnes2011-08-102-317/+355 * EMailSidebar: Miscellaneous cleanups.Matthew Barnes2011-08-101-33/+13 * EMFolderTree: Miscellaneous cleanups.Matthew Barnes2011-08-101-51/+27 * EMFolderSelectionButton: Add a "folder-uri" property.Matthew Barnes2011-08-107-39/+66 * Bug #655492 - Move 'Automatic contacts' tab to 'Contacts' partMilan Crha2011-08-096-11/+129 * Bug #655494 - Move 'Calendar and Tasks' tab out of Mail PreferencesMilan Crha2011-08-092-3/+3 * Bug #655872 - [pst-import] Fails to properly open remote clientMilan Crha2011-08-091-125/+184 * Remove non-existing option as pointed out by Akhil LaddhaAndre Klapper2011-08-091-3/+1 * Fix TODO now that the code is fixedAndre Klapper2011-08-091-3/+3 * Bug #655669 - Can't save inline pictures embedded in HTML MailsMilan Crha2011-08-095-1/+232 * EShell: Remove unused macro.Matthew Barnes2011-08-081-2/+0 * Bug #656136 - Remove time field in task editorMilan Crha2011-08-082-90/+21 * Cannot reply to message without preview panel enabledMilan Crha2011-08-081-0/+74 * Updated Swedish translationDaniel Nylander2011-08-081-4/+4 * Help->FAQ menu item and action are goneMilan Crha2011-08-081-1/+0 * Updated Spanish translationDaniel Mustieles2011-08-081-38/+9 * Updated Spanish translationDaniel Mustieles2011-08-081-550/+607 * Updated Spanish translationDaniel Mustieles2011-08-081-100/+71 * Updated Galician translationsFran Dieguez2011-08-071-1135/+1193 * Updated Spanish translationDaniel Mustieles2011-08-061-4190/+3444 * Fix typos in new docsYuri Chornoivan2011-08-069-9/+9 * Bug 656035. Add missing colon to stringAndre Klapper2011-08-061-1/+1 * EModule: Make all modules resident.Matthew Barnes2011-08-062-13/+30 * Bugfixes and corrections pointed out by Akhil LaddhaAndre Klapper2011-08-0515-25/+28 * Updated Swedish translationDaniel Nylander2011-08-051-204/+205 * Bug #655943 - Meeting request mails are not imported properlyMilan Crha2011-08-051-4/+107 * Remove link to FAQ as content is covered by new user docsAndre Klapper2011-08-051-26/+0 * Rename picture to new nameAndre Klapper2011-08-046-0/+0 * Add the one reused translatable picture againAndre Klapper2011-08-046-0/+0 * Merge old translations for new user docsAndre Klapper2011-08-04