diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0112-stats.sh13
1 file changed, 6 insertions, 7 deletions
diff --git a/tests/t0112-stats.sh b/tests/t0112-stats.sh
index 262932c..4d61e6c 100755
--- a/tests/t0112-stats.sh
+++ b/tests/t0112-stats.sh
@@ -1,14 +1,14 @@
#!/bin/sh
-# Checks the per repository statistics page, which stays off until a config
-# turns it on and then reports commits per author. A second config caps the
-# period so that what max-stats takes out of the period selector is covered
+# Checks the per repository statistics page, which stays off until max-stats
+# turns it on and then reports commits per author. A second config sets a
+# finer max-stats so that what it takes out of the period selector is covered
# as well.
test_description='Check the statistics page'
. ./setup.sh
-# The shared test config sets no enable-stats, so this is what an untouched
+# The shared test config sets no max-stats, so this is what an untouched
# install does.
test_expect_success 'stats are off by default' '
cgit_url "foo/stats" >tmp &&
@@ -31,14 +31,13 @@ test_expect_success 'set up a stats config' '
{
echo "virtual-root=/" &&
echo "cache-size=0" &&
- echo "enable-stats=1" &&
+ echo "max-stats=year" &&
echo "repo.url=stat" &&
echo "repo.path=$PWD/repos/pulse/.git"
} >statsrc &&
{
echo "virtual-root=/" &&
echo "cache-size=0" &&
- echo "enable-stats=1" &&
echo "max-stats=month" &&
echo "repo.url=stat" &&
echo "repo.path=$PWD/repos/pulse/.git"
@@ -71,7 +70,7 @@ test_expect_success 'stats below a path stay a normal page' '
grep "<h2>Commits per author" tmp
'
-test_expect_success 'all four periods offered when max-stats is unset' '
+test_expect_success 'max-stats=year offers all four periods' '
statq "url=stat/stats/" >tmp &&
grep "<option value=.w." tmp &&
grep "<option value=.m." tmp &&