mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 04:09:29 +02:00
test(avatar): deleting a user avatar is idempotent
If the avatar file in storage does not exist, it is not an error and the database can be updated. See1be797faba
Fix bug on avatar (cherry picked from commitd2c4d833f4
)
This commit is contained in:
parent
32d8ada0e7
commit
cf2d8b57ae
4 changed files with 62 additions and 29 deletions
|
@ -11,9 +11,9 @@ import (
|
|||
)
|
||||
|
||||
func Test_discardStorage(t *testing.T) {
|
||||
tests := []discardStorage{
|
||||
tests := []DiscardStorage{
|
||||
UninitializedStorage,
|
||||
discardStorage("empty"),
|
||||
DiscardStorage("empty"),
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(string(tt), func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue