message: test: for createCursor, getRecordsByCursor, and deleteCursor
diff: @@ -147,4 +147,61 @@ describe("RecordClient", () => {
  expect(mockClient.getLogs()[0].params).toEqual(params);
  });
  });
  +
  + describe("createCursor", () => {
  + const params = {
  + app: APP_ID,
  + fields: [fieldCode],
  + query: `${fieldCode} = "foo"`,
  + size: 10
  + };
  + beforeEach(() => {
  + recordClient.createCursor(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/records/cursor.json");
  + });
  + it("should send a post request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("post");
  + });
  + it("should pass app, fields, query, and size to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  +
  + describe("getRecordsByCursor", () => {
  + const params = {
  + id: "cursor id"
  + };
  + beforeEach(() => {
  + recordClient.getRecordsByCursor(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/records/cursor.json");
  + });
  + it("should send a get request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("get");
  + });
  + it("should pass id to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  +
  + describe("deleteCursor", () => {
  + const params = {
  + id: "cursor id"
  + };
  + beforeEach(() => {
  + recordClient.deleteCursor(params);
  + });
  + it("should pass the path to the http client", () => {
  + expect(mockClient.getLogs()[0].path).toBe("/k/v1/records/cursor.json");
  + });
  + it("should send a delete request", () => {
  + expect(mockClient.getLogs()[0].method).toBe("delete");
  + });
  + it("should pass id to the http client", () => {
  + expect(mockClient.getLogs()[0].params).toEqual(params);
  + });
  + });
  });
  