Skip to content

Commit

Permalink
fix: data endpoint needs to pass branch id to cli (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickharris committed Jan 21, 2020
1 parent 584c25a commit 328e5ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/endpoints/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default class Data extends Endpoint {
"layer",
"data",
latestDescriptor.projectId,
latestDescriptor.branchId,
latestDescriptor.sha,
latestDescriptor.fileId,
latestDescriptor.layerId
Expand Down
17 changes: 14 additions & 3 deletions tests/endpoints/Data.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 328e5ef

Please sign in to comment.