import reducer from "../../../store/reducers/processes/statusUpdateReducer";
import expect from "expect";
import {
  registerError,
  registerSuccess,
} from "../../../store/actions/register/registerActions";
import {
  setUpdateStatusErr,
  setUpdateStatusReq,
  setUpdateStatusSucc,
} from "../../../store/actions/processes/processAction";

describe("status update reducer", () => {
  it("should set success", () => {
    expect(reducer(undefined, setUpdateStatusSucc())).toEqual({
      success: true,
      errorMessage: "",
    });
  });

  it("should set error", () => {
    expect(reducer(undefined, setUpdateStatusErr("Error"))).toEqual({
      success: false,
      errorMessage: "Error",
    });
  });

  it("should set error", () => {
    expect(reducer(undefined, setUpdateStatusReq("any"))).toEqual({
      success: false,
      errorMessage: "",
    });
  });
});
