mirror of
https://github.com/Awesome-Technologies/synapse-admin.git
synced 2024-10-31 06:55:15 +03:00
4761ea36bc
Change-Id: I39ad44666fe958dd4f6c8f0d88b3dc960d7cb6c7
18 lines
474 B
TypeScript
18 lines
474 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { RecordContextProvider } from "react-admin";
|
|
|
|
import AvatarField from "./AvatarField";
|
|
|
|
describe("AvatarField", () => {
|
|
it("shows image", () => {
|
|
const value = {
|
|
avatar: "foo",
|
|
};
|
|
render(
|
|
<RecordContextProvider value={value}>
|
|
<AvatarField source="avatar" />
|
|
</RecordContextProvider>
|
|
);
|
|
expect(screen.getByRole("img").getAttribute("src")).toBe("foo");
|
|
});
|
|
});
|