From c1564ab64112150715a87aefe292cd9b996cea6b Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Tue, 20 Jun 2017 18:14:40 -0700 Subject: [PATCH] add branch test for bb server. --- test/git-open.bats | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/git-open.bats b/test/git-open.bats index 7514496..6f8118d 100755 --- a/test/git-open.bats +++ b/test/git-open.bats @@ -201,6 +201,18 @@ setup() { assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr" } +@test "bitbucket: Bitbucket Server branch" { + # https://github.com/paulirish/git-open/issues/80 + git remote set-url origin "https://user@mybb.domain.com/git/scm/ppp/rrr.git" + git checkout -B "develop" + run ../git-open + + # The following query args work with BB Server: + # at=refs%2Fheads%2Fdevelop, at=develop, at=refs/heads/develop + # However /src/develop does not (unlike bitbucket.org) + assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr?at=develop" +} + ## ## GitLab