diff --git a/app/browser/windows.js b/app/browser/windows.js index e434acf3536..88c5f149f97 100644 --- a/app/browser/windows.js +++ b/app/browser/windows.js @@ -9,7 +9,7 @@ const debounce = require('../../js/lib/debounce') const {getSetting} = require('../../js/settings') const locale = require('../locale') const LocalShortcuts = require('../localShortcuts') -const {getSiteProps} = require('../common/lib/windowsUtil') +const {getPinnedSiteProps} = require('../common/lib/windowsUtil') const {makeImmutable} = require('../common/state/immutableUtil') const {getPinnedTabsByWindowId} = require('../common/state/tabState') const {siteSort} = require('../../js/state/siteUtil') @@ -71,7 +71,7 @@ const updatePinnedTabs = (win) => { const state = appStore.getState() const windowId = win.id const pinnedSites = state.get('sites').toList().filter((site) => - site.get('tags').includes(siteTags.PINNED)).map(site => getSiteProps(site)) + site.get('tags').includes(siteTags.PINNED)).map(site => getPinnedSiteProps(site)) const pinnedTabs = getPinnedTabsByWindowId(state, windowId) pinnedSites.filter((site) => diff --git a/app/common/lib/windowsUtil.js b/app/common/lib/windowsUtil.js index acb373f8c1e..c15f82e9bde 100644 --- a/app/common/lib/windowsUtil.js +++ b/app/common/lib/windowsUtil.js @@ -4,7 +4,7 @@ const Immutable = require('immutable') -module.exports.getSiteProps = site => { +module.exports.getPinnedSiteProps = site => { return Immutable.fromJS({ location: site.get('location'), order: site.get('order'), diff --git a/test/unit/app/common/lib/windowsUtilTest.js b/test/unit/app/common/lib/windowsUtilTest.js index 21e08702c1d..60ece75b82b 100644 --- a/test/unit/app/common/lib/windowsUtilTest.js +++ b/test/unit/app/common/lib/windowsUtilTest.js @@ -16,7 +16,7 @@ describe('windowsUtil', () => { }) let site - describe('getSiteProps', () => { + describe('getPinnedSiteProps', () => { beforeEach(() => { site = Immutable.fromJS({ favicon: 'https://css-tricks.com/favicon.ico', @@ -28,12 +28,12 @@ describe('windowsUtil', () => { }) }) it('returns object with necessary fields', () => { - const result = windowsUtil.getSiteProps(site) + const result = windowsUtil.getPinnedSiteProps(site) assert.deepEqual(expectedSiteProps, result) }) it('set partitionNumber field to 0 in case of missing this field', () => { site = site.delete('partitionNumber') - const result = windowsUtil.getSiteProps(site) + const result = windowsUtil.getPinnedSiteProps(site) assert.equal(0, result.get('partitionNumber')) }) })