aboutsummaryrefslogtreecommitdiff
path: root/gitosis/test/test_gitweb.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitosis/test/test_gitweb.py')
-rw-r--r--gitosis/test/test_gitweb.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/gitosis/test/test_gitweb.py b/gitosis/test/test_gitweb.py
index ca42a76..cf37a44 100644
--- a/gitosis/test/test_gitweb.py
+++ b/gitosis/test/test_gitweb.py
@@ -5,7 +5,7 @@ from ConfigParser import RawConfigParser
from cStringIO import StringIO
from gitosis import gitweb
-from gitosis.test.util import mkdir, maketemp
+from gitosis.test.util import mkdir, maketemp, readFile
def test_projectsList_empty():
cfg = RawConfigParser()
@@ -105,3 +105,21 @@ def test_projectsList_reallyEndsWithGit():
eq(got.getvalue(), '''\
foo.git
''')
+
+def test_projectsList_path():
+ tmp = maketemp()
+ path = os.path.join(tmp, 'foo.git')
+ mkdir(path)
+ cfg = RawConfigParser()
+ cfg.add_section('gitosis')
+ cfg.set('gitosis', 'repositories', tmp)
+ cfg.add_section('repo foo')
+ cfg.set('repo foo', 'gitweb', 'yes')
+ projects_list = os.path.join(tmp, 'projects.list')
+ gitweb.generate_project_list(
+ config=cfg,
+ path=projects_list)
+ got = readFile(projects_list)
+ eq(got, '''\
+foo.git
+''')