message: test: for methods for /preview/app/deploy
diff: @@ -113,7 +113,7 @@ describe("AppClient", () => {
  });
  });
  - describe("deleteRecords", () => {
  + describe("deleteFormFields", () => {
  const fields = ["fieldCode1", "fieldCode2"];
  const params = { app: APP_ID, fields, revision: REVISION };
  beforeEach(() => {
  @@ -184,4 +184,45 @@ describe("AppClient", () => {
  expect(mockClient.getLogs()[0].params).toEqual(params);
  });
  });
  +
  + describe("getDeployStatus", () => {
  + const params = {
  + apps: [APP_ID]
  + };
  + beforeEach(() => {
  + appClient.getDeployStatus(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe(
  + "/k/v1/preview/app/deploy.json"
  + );
  + });
  + it("should send a get request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("get");
  + });
  + it("should pass apps as a param to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  +
  + describe("deployApp", () => {
  + const params = {
  + apps: [{ app: APP_ID, revision: REVISION }],
  + revert: true
  + };
  + beforeEach(() => {
  + appClient.deployApp(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe(
  + "/k/v1/preview/app/deploy.json"
  + );
  + });
  + it("should send a post request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("post");
  + });
  + it("should pass apps and revert as a param to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  });
  