From 328e5ef24f2bd1ebba3d0637ad8d6c103d1d1a3c Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Tue, 21 Jan 2020 16:22:18 -0600 Subject: [PATCH] fix: data endpoint needs to pass branch id to cli (#208) --- src/endpoints/Data.js | 1 + tests/endpoints/Data.test.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/endpoints/Data.js b/src/endpoints/Data.js index 58f40ef9..361b51a3 100644 --- a/src/endpoints/Data.js +++ b/src/endpoints/Data.js @@ -29,6 +29,7 @@ export default class Data extends Endpoint { "layer", "data", latestDescriptor.projectId, + latestDescriptor.branchId, latestDescriptor.sha, latestDescriptor.fileId, latestDescriptor.layerId diff --git a/tests/endpoints/Data.test.js b/tests/endpoints/Data.test.js index c6b84a89..9e8c3df1 100644 --- a/tests/endpoints/Data.test.js +++ b/tests/endpoints/Data.test.js @@ -30,9 +30,20 @@ describe("data", () => { }); test("cli", async () => { - mockCLI(["layer", "data", "project-id", "sha", "file-id", "layer-id"], { - layerId: "layer-id" - }); + mockCLI( + [ + "layer", + "data", + "project-id", + "branch-id", + "sha", + "file-id", + "layer-id" + ], + { + layerId: "layer-id" + } + ); const response = await CLI_CLIENT.data.info({ branchId: "branch-id",