import reducer from "../../../../store/reducers/ad/archiveActiveAdReducer";
import expect from "expect";
import {
  archiveActiveAd,
  archiveActiveAdError,
} from "../../../../store/actions/archiveActiveAd/archiveActiveAdActions";

describe("archiveActiveAd reducer", () => {
  it("should return the initial state", () => {
    expect(reducer(undefined, {})).toEqual({
      errorMessage: "",
    });
  });

  it("should set the state error", () => {
    expect(reducer(undefined, archiveActiveAdError("Error"))).toEqual({
      errorMessage: "Error",
    });
  });

  it("should set the state success", () => {
    expect(reducer(undefined, archiveActiveAd())).toEqual({
      errorMessage: "",
    });
  });
});
