import {call, put, take} from 'redux-saga/effects'
import sagasHelper from '../helper'
import { selectVmDetail, fetchSingleVm } from '../../src/sagas'
import { selectVmDetail as selectAction, setVmDetailToShow, getSingleVm, loadInProgress } from '../../src/actions'

describe('Get VM detail test: ', () => {
	const it2 = sagasHelper(selectVmDetail(selectAction({ vmId: '123' })))

  it2('First we check returned data: ', (result) => {
    expect(result).toEqual(fetchSingleVm(getSingleVm({ vmId: '123' })))
  })

	it2('Then we check setting loadInProgress value to false: ', (result) => {
		expect(result).toEqual(put(loadInProgress({ value: false })))
	})
})

@@ -508,153 +508,8 @@
   %7D)
-%0A%0A%09it2('Then we check setting loadInProgress value to false: ', (result) =%3E %7B%0A%09%09expect(result).toEqual(put(loadInProgress(%7B value: false %7D)))%0A%09%7D)
 %0A%7D)%0A

Fix test of selectVmDetail()