import { render } from "@testing-library/react";
import React from "react";

import addSnapshotSerializer from "../../../utils/snapshot";
import Result from "./result";

describe("Magna Security DLL page", () => {
  beforeAll(() => {
    global.URL.createObjectURL = jest.fn();
    global.URL.revokeObjectURL = jest.fn();
    addSnapshotSerializer(expect);
  });

  it("Security DLL Result page", () => {
    const result = {public_key:"-----BEGIN CERTIFICATE-----\nPUBLIC_KEY\n-----END CERTIFICATE-----",private_key:"-----BEGIN RSA PRIVATE KEY-----\nPRIVATE_KEY\n-----END RSA PRIVATE KEY-----",serial_number:"77:49:34:9d:be:f6:59:03:b4:1c:63:84:07:5b:2a:8a:21:0a:c5:9e",type:"rsa"}
    const { container } = render(<Result {...result} />);

    expect(container).toMatchSnapshot();

  })
})