You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

initProccesReducer.test.js 788B

1234567891011121314151617181920212223242526272829
  1. import reducer from "../../../store/reducers/candidates/initProcessReducer";
  2. import expect from "expect";
  3. import {
  4. fetchInitProcessSuccess,
  5. fetchInitProcessError,
  6. } from "../../../store/actions/candidates/candidatesActions";
  7. describe("initProcces reducer", () => {
  8. it("should return the initial state", () => {
  9. expect(reducer(undefined, {})).toEqual({
  10. isSuccess: false,
  11. errorMessage: "",
  12. });
  13. });
  14. it("should set the state error", () => {
  15. expect(reducer(undefined, fetchInitProcessError("Error"))).toEqual({
  16. isSuccess: false,
  17. errorMessage: "Error",
  18. });
  19. });
  20. it("should set the state success", () => {
  21. expect(reducer(undefined, fetchInitProcessSuccess())).toEqual({
  22. isSuccess: true,
  23. errorMessage: "",
  24. });
  25. });
  26. });