diff options
author | vince <vincetiu8@gmail.com> | 2020-07-20 18:08:37 +0800 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-07-28 14:30:05 +0200 |
commit | 7dbcca84c7a0b6658463e3e54690b8860b662b6e (patch) | |
tree | 297e6f329d912309abffce739450fdec74699d1e | |
parent | 4e4ca106aea25da74f1df49d33f4eaa272a6e8f0 (diff) | |
download | git-bug-7dbcca84c7a0b6658463e3e54690b8860b662b6e.tar.gz |
Add test for removing bug from cache
-rw-r--r-- | cache/repo_cache_test.go | 5 |
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) { |