From 3f8a4b6b5db657e5db1bd6442d27ae32d075b4e4 Mon Sep 17 00:00:00 2001 From: Laurent Vauthrin Date: Wed, 22 Mar 2023 13:40:55 -0400 Subject: [PATCH] Compare only filename in test since full url can vary based on how the repo was checked out --- tests/openingh_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/openingh_spec.lua b/tests/openingh_spec.lua index 5bee778..3d91d8b 100644 --- a/tests/openingh_spec.lua +++ b/tests/openingh_spec.lua @@ -37,7 +37,7 @@ describe("openingh should open", function() vim.api.nvim_win_set_cursor(0, { 3, 0 }) vim.cmd("OpenInGHFile") local status = vim.g.OPENINGH_RESULT - local expected = "/blob/main/README.md#L3" + local expected = "/README.md#L3" assert.equal(expected, status:sub(-#expected)) end) @@ -47,7 +47,7 @@ describe("openingh should open", function() vim.api.nvim_buf_set_mark(0, ">", 10, 0, {}) vim.cmd("'<,'>OpenInGHFile") local status = vim.g.OPENINGH_RESULT - local expected = "/blob/main/README.md#L5-L10" + local expected = "/README.md#L5-L10" assert.equal(expected, status:sub(-#expected)) end) end)