Skip to content

Commit 74643e6

Browse files
committed
test: add an isPackPost test cases for multi-level orgs and no org
1 parent 9856f70 commit 74643e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/teeAndValidation.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ describe('isPackPost()', () => {
7979
it('returns true for git-upload-pack POST', () => {
8080
expect(isPackPost({ method: 'POST', url: '/a/b.git/git-upload-pack' })).to.be.true;
8181
});
82+
it('returns true for git-upload-pack POST, with a gitlab style multi-level org', () => {
83+
expect(isPackPost({ method: 'POST', url: '/a/bee/sea/dee.git/git-upload-pack' })).to.be.true;
84+
});
85+
it('returns true for git-upload-pack POST, with a bare (no org) repo URL', () => {
86+
expect(isPackPost({ method: 'POST', url: '/a.git/git-upload-pack' })).to.be.true;
87+
});
8288
it('returns false for other URLs', () => {
8389
expect(isPackPost({ method: 'POST', url: '/info/refs' })).to.be.false;
8490
});

0 commit comments

Comments
 (0)