Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test the download row on the commit page
| -rwxr-xr-x | tests/t0106-commit.sh | 10 |
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/t0106-commit.sh b/tests/t0106-commit.sh index 58e0de8..a6e7db1 100755 --- a/tests/t0106-commit.sh +++ b/tests/t0106-commit.sh @@ -110,6 +110,16 @@ test_expect_success 'an octopus merge draws no diff and offers no diff options' test_grep "<table class=.diffstat.>" tmp ' +test_expect_success 'the commit page offers a download per snapshot format' ' + cgit_ok_url "foo/commit" >tmp && + test_grep "<th scope=.row.>download</th><td colspan=.2. class=.oid.><div class=.spanning.><span class=.snapshot.><a href=./foo/snapshot/foo-master.tar.>foo-master.tar</a></span><br>" tmp && + test_grep "<a href=./foo/snapshot/foo-master.zip.>foo-master.zip</a>" tmp && + cgitrc_repo nosnaprc foo && + cgit_ok nosnaprc "url=foo/commit" >tmp && + test_grep "<th scope=.row.>tree</th>" tmp && + test_grep ! ">download</th>" tmp +' + test_expect_success 'a note is shown below the message' ' git -C repos/foo notes add -m "a note on five" master && test_when_finished "git -C repos/foo notes remove master" && |
