aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache_test.go
diff options
context:
space:
mode:
authorvince <vincetiu8@gmail.com>2020-07-20 18:08:37 +0800
committerMichael Muré <batolettre@gmail.com>2020-07-28 14:30:05 +0200
commit7dbcca84c7a0b6658463e3e54690b8860b662b6e (patch)
tree297e6f329d912309abffce739450fdec74699d1e /cache/repo_cache_test.go
parent4e4ca106aea25da74f1df49d33f4eaa272a6e8f0 (diff)
downloadgit-bug-7dbcca84c7a0b6658463e3e54690b8860b662b6e.tar.gz
Add test for removing bug from cache
Diffstat (limited to 'cache/repo_cache_test.go')
-rw-r--r--cache/repo_cache_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go
index 0a333c8f..276da4be 100644
--- a/cache/repo_cache_test.go
+++ b/cache/repo_cache_test.go
@@ -101,6 +101,11 @@ func TestCache(t *testing.T) {
require.NoError(t, err)
_, err = cache.ResolveBugPrefix(bug1.Id().String()[:10])
require.NoError(t, err)
+
+ // Possible to delete a bug
+ err = cache.RemoveBug([]string{bug1.Id().Human()})
+ require.NoError(t, err)
+ require.Equal(t, len(cache.AllBugsIds()), 1)
}
func TestPushPull(t *testing.T) {