{"size": 610, "ext": "js", "max_stars_repo_path": "src/reducers/__tests__/contactModal.test.js", "max_stars_repo_name": "RXstoinkboy/dream-house", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/reducers/__tests__/contactModal.test.js", "max_issues_repo_name": "RXstoinkboy/dream-house", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducers/__tests__/contactModal.test.js", "max_forks_repo_name": "RXstoinkboy/dream-house", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.8888888889, "max_line_length": 71, "alphanum_fraction": 0.6655737705}
import {contactModal} from '../contactModal'
import {TOGGLE_CONTACT_MODAL} from '../../actions/types'

describe('contactModal reducer', ()=>{
    it('initial state is returned if action is not recognized',()=>{
        const action = {type: 'dummy test'};
        const initialState = false;

        expect(contactModal(undefined, action)).toEqual(initialState);
    })

    it('returnes true if TOGGLE_CONTACT_MODAL is dispatched',()=>{
        const action = {type: TOGGLE_CONTACT_MODAL};
        const expectedState = true;

        expect(contactModal(undefined, action)).toEqual(expectedState);
    })
})