diff options
author | Christopher Baines <mail@cbaines.net> | 2019-08-05 20:59:48 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-08-05 20:59:48 +0100 |
commit | 9e80bda4f91e06e3e1d60cf48d33534b7cabb626 (patch) | |
tree | eca0240b347dfc7566553bfb312fff11feecba6e /tests/model-git-branch.scm | |
parent | 712dd377a1e972dd6a04d461b3d59ab8a279ae2f (diff) | |
download | data-service-9e80bda4f91e06e3e1d60cf48d33534b7cabb626.tar data-service-9e80bda4f91e06e3e1d60cf48d33534b7cabb626.tar.gz |
Avoid erroring when processing emails again
These changes allow processing emails again, and just creating job and branch
entries where data is missing.
Diffstat (limited to 'tests/model-git-branch.scm')
-rw-r--r-- | tests/model-git-branch.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/model-git-branch.scm b/tests/model-git-branch.scm index a879408..c69f69d 100644 --- a/tests/model-git-branch.scm +++ b/tests/model-git-branch.scm @@ -22,6 +22,25 @@ id (current-date))) #t) + #:always-rollback? #t)) + + (test-assert "insert-git-branch-entry works twice" + (with-postgresql-transaction + conn + (lambda (conn) + (let* ((url "test-url") + (id (git-repository-url->git-repository-id conn url))) + (insert-git-branch-entry conn + "master" + "test-commit" + id + (current-date)) + (insert-git-branch-entry conn + "master" + "test-commit" + id + (current-date))) + #t) #:always-rollback? #t)))) (test-end) |