remove 'git/' from test cases

This commit is contained in:
Paul Irish 2017-06-21 09:53:12 -07:00
parent 8c13e68ddf
commit 35d4b6587c

View file

@ -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"
}