Skip to content

Commit dd46e8b

Browse files
Copilotsshaw
andcommitted
Replace partial URL validation with complete URL assertion in interactive test
Co-authored-by: sshaw <17570+sshaw@users.noreply.github.com>
1 parent 557e3c6 commit dd46e8b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

git-link-test.el

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,8 @@
384384

385385
;; Call git-link interactively
386386
(let ((result (git-link "origin" 3 nil))) ; Line 3, no end line
387-
;; Verify the result contains GitHub URL with line number
388-
(should (stringp result))
389-
(should (string-match-p "github\\.com" result))
390-
(should (string-match-p "test-file\\.txt" result))
391-
(should (string-match-p "#L3" result)))
387+
;; Verify the result is the complete expected URL
388+
(should (equal "https://github.com/user/repo/blob/master/test-file.txt#L3" result)))
392389

393390
;; Clean up buffer
394391
(kill-buffer)))

0 commit comments

Comments
 (0)