diff --git a/test/git-open.bats b/test/git-open.bats index d6daee0..48da34d 100755 --- a/test/git-open.bats +++ b/test/git-open.bats @@ -196,27 +196,27 @@ setup() { @test "bitbucket: Bitbucket Server" { # https://github.com/paulirish/git-open/issues/77#issuecomment-309044010 - git remote set-url origin "https://user@mybb.domain.com/git/scm/ppp/rrr.git" + git remote set-url origin "https://user@mybb.domain.com/scm/ppp/rrr.git" run ../git-open # any of the following are acceptable - assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr" || - assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr/browse/?at=master" || - assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr/browse/?at=refs%2Fheads%2Fmaster" + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr" || + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr/browse/?at=master" || + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr/browse/?at=refs%2Fheads%2Fmaster" } @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 remote set-url origin "https://user@mybb.domain.com/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/browse?at=develop" || - assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr/browse?at=refs%2Fheads%2Fdevelop" || - assert_output "https://mybb.domain.com/git/projects/ppp/repos/rrr/browse?at=refs/heads/develop" + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr/browse?at=develop" || + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr/browse?at=refs%2Fheads%2Fdevelop" || + assert_output "https://mybb.domain.com/projects/ppp/repos/rrr/browse?at=refs/heads/develop" refute_output --partial "/src/develop" } @@ -224,12 +224,12 @@ setup() { @test "bitbucket: Bitbucket Server private user repos" { # https://github.com/paulirish/git-open/pull/83#issuecomment-309968538 - git remote set-url origin "https://mybb.domain.com/git/scm/~first.last/rrr.git" + git remote set-url origin "https://mybb.domain.com/scm/~first.last/rrr.git" git checkout -B "develop" run ../git-open - assert_output "https://mybb.domain.com/git/projects/~first.last/repos/rrr/browse?at=develop" || - assert_output "https://mybb.domain.com/git/projects/~first.last/repos/rrr/browse?at=refs%2Fheads%2Fdevelop" || - assert_output "https://mybb.domain.com/git/projects/~first.last/repos/rrr/browse?at=refs/heads/develop" + assert_output "https://mybb.domain.com/projects/~first.last/repos/rrr/browse?at=develop" || + assert_output "https://mybb.domain.com/projects/~first.last/repos/rrr/browse?at=refs%2Fheads%2Fdevelop" || + assert_output "https://mybb.domain.com/projects/~first.last/repos/rrr/browse?at=refs/heads/develop" }