import reducer from "../../../store/reducers/register/registerReducer";
import expect from "expect";
import {
  registerError,
  registerSuccess,
} from "../../../store/actions/register/registerActions";

describe("register reducer", () => {
  it("should set success", () => {
    expect(reducer(undefined, registerSuccess())).toEqual({
      isSuccess: true,
      errorMessage: "",
    });
  });

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