mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-31 06:41:35 +00:00
Move Delete Container call to use ARM when logged in with AAD (#110)
This commit is contained in:
13
src/Common/dataAccess/deleteCollection.test.ts
Normal file
13
src/Common/dataAccess/deleteCollection.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
jest.mock("../../Utils/arm/request");
|
||||
import { deleteCollection } from "./deleteCollection";
|
||||
import { armRequest } from "../../Utils/arm/request";
|
||||
import { AuthType } from "../../AuthType";
|
||||
|
||||
describe("deleteCollection", () => {
|
||||
it("should call ARM if logged in with AAD", async () => {
|
||||
window.authType = AuthType.AAD;
|
||||
await deleteCollection("database", "collection");
|
||||
expect(armRequest).toHaveBeenCalled();
|
||||
});
|
||||
// TODO: Test non-AAD case
|
||||
});
|
||||
Reference in New Issue
Block a user