import { fromJS } from 'immutable'
import * as ui from '../ui'

describe('ui selectors', () => {
  describe('getActiveCalculatorId', () => {
    it('defaults to null', () => {
      const id = ui.getActiveCalculatorId(fromJS({}))
      expect(id).to.eq(null)
    })

    it('pulls correct id from state', () => {
      const id = ui.getActiveCalculatorId(fromJS({ ui: { activeCalculatorId: 'abc' } }))
      expect(id).to.eq('abc')
    })
  })
})
