[#7] fixed move destination
This commit is contained in:
@@ -79,15 +79,14 @@ describe("eventApi", () => {
|
||||
(api as unknown as jest.Mock).mockReturnValue({
|
||||
json: jest.fn().mockResolvedValue(mockResponse),
|
||||
});
|
||||
const result = await moveEvent(mockEvent);
|
||||
const result = await moveEvent(mockEvent, "newurl.ics");
|
||||
|
||||
expect(api).toHaveBeenCalledWith(
|
||||
"dav/calendars/667037022b752d0026472254/667037022b752d0026472254/cal1.ics",
|
||||
expect.objectContaining({
|
||||
method: "MOVE",
|
||||
headers: {
|
||||
destination:
|
||||
"/calendars/667037022b752d0026472254/667037022b752d0026472254/cal1.ics",
|
||||
destination: "newurl.ics",
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -796,7 +796,6 @@ describe("Event Full Display", () => {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(mockOnClose).toHaveBeenCalledWith({}, "backdropClick");
|
||||
});
|
||||
|
||||
const updatedEvent = spy.mock.calls[0][0].newEvent;
|
||||
@@ -854,7 +853,6 @@ describe("Event Full Display", () => {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(mockOnClose).toHaveBeenCalledWith({}, "backdropClick");
|
||||
});
|
||||
|
||||
const updatedEvent = spy.mock.calls[0][0].newEvent;
|
||||
@@ -912,7 +910,6 @@ describe("Event Full Display", () => {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalled();
|
||||
expect(mockOnClose).toHaveBeenCalledWith({}, "backdropClick");
|
||||
});
|
||||
|
||||
const updatedEvent = spy.mock.calls[0][0].newEvent;
|
||||
|
||||
Reference in New Issue
Block a user