/*
 * File: caseReviewSlice.test.ts
 * Description: Test for caseReviewSlice reducer
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import reducer, { selectCase, setError, ReviewCase } from '../redux/caseReviewSlice';

const initialState = {
  selectedCase: null,
  loading: false,
  error: null,
};

describe('caseReviewSlice', () => {
  it('handles selectCase', () => {
    const reviewCase: ReviewCase = { id: '1', patientName: 'John Doe', images: [], aiFindings: 'None' };
    const state = reducer(initialState, selectCase(reviewCase));
    expect(state.selectedCase).toEqual(reviewCase);
  });

  it('handles setError', () => {
    const error = 'Failed to load';
    const state = reducer(initialState, setError(error));
    expect(state.error).toBe(error);
  });
});

/*
 * End of File: caseReviewSlice.test.ts
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */ 