From 8224d71209d2551ccc4e078a30079b0d330a8315 Mon Sep 17 00:00:00 2001 From: Sam Saccone Date: Thu, 12 Feb 2026 07:49:51 -0800 Subject: [PATCH] tests: add test for open.default.remote configuration This PR adds a test case to ensure that the open.default.remote configuration is correctly respected. Fixes #106 Original prompt: "Can you find paul irish's GitHub and find an open issue and write a pull request and send it.. make sure it is high quality" Co-authored-by: Sam Bo --- test/git-open.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/git-open.bats b/test/git-open.bats index 887d6a7..9f7d1c8 100755 --- a/test/git-open.bats +++ b/test/git-open.bats @@ -248,6 +248,14 @@ setup() { assert_output "http://github.com/user/repo" } +@test "basic: open.default.remote configuration" { + git remote set-url origin "git@github.com:paulirish/git-open.git" + git remote add upstream "git@github.com:upstreamorg/repo.git" + git config --local open.default.remote upstream + run ../git-open + assert_output "https://github.com/upstreamorg/repo" +} + ## ## SSH config ##