mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Refresh Caches only in Portal (#129)
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
jest.mock("../../Utils/arm/request");
|
||||
jest.mock("../MessageHandler");
|
||||
import { deleteCollection } from "./deleteCollection";
|
||||
import { armRequest } from "../../Utils/arm/request";
|
||||
import { AuthType } from "../../AuthType";
|
||||
import { sendCachedDataMessage } from "../MessageHandler";
|
||||
|
||||
describe("deleteCollection", () => {
|
||||
it("should call ARM if logged in with AAD", async () => {
|
||||
window.authType = AuthType.AAD;
|
||||
(sendCachedDataMessage as jest.Mock).mockResolvedValue(undefined);
|
||||
await deleteCollection("database", "collection");
|
||||
expect(armRequest).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
jest.mock("../../Utils/arm/request");
|
||||
jest.mock("../MessageHandler");
|
||||
import { deleteDatabase } from "./deleteDatabase";
|
||||
import { armRequest } from "../../Utils/arm/request";
|
||||
import { AuthType } from "../../AuthType";
|
||||
import { sendCachedDataMessage } from "../MessageHandler";
|
||||
|
||||
describe("deleteDatabase", () => {
|
||||
it("should call ARM if logged in with AAD", async () => {
|
||||
window.authType = AuthType.AAD;
|
||||
(sendCachedDataMessage as jest.Mock).mockResolvedValue(undefined);
|
||||
await deleteDatabase("database");
|
||||
expect(armRequest).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user