fix: change tests to accept the bools for hard deletion

This commit is contained in:
soxx 2025-01-28 14:04:51 +01:00
parent c9b0c71bef
commit 0e87b43339
8 changed files with 9 additions and 9 deletions

View File

@ -415,7 +415,7 @@ func TestUpdateUserFavorite(t *testing.T) {
// --
// -- Delete UserFavorite
err = DeleteUserFavorite(ctx, validFavorite.ID)
err = DeleteUserFavorite(ctx, validFavorite.ID, false)
if err != nil {
t.Fatalf("CreateUserFavorite err: %v", err)
}
@ -745,7 +745,7 @@ func TestDeleteUserFavorite(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeleteUserFavorite(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeleteUserFavorite(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeleteUserFavorite() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -353,7 +353,7 @@ func TestDeletePool(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeletePool(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeletePool(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeletePool() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -491,7 +491,7 @@ func TestDeletePostReport(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeletePostReport(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeletePostReport(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeletePostReport() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -438,7 +438,7 @@ func TestDeletePost(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeletePost(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeletePost(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeletePost() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -530,7 +530,7 @@ func TestDeleteSource(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeleteSource(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeleteSource(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeleteSource() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -250,7 +250,7 @@ func TestDeleteTag(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeleteTag(tt.args.ctx, tt.args.tagID); (err != nil) != tt.wantErr {
if err := DeleteTag(tt.args.ctx, tt.args.tagID, false); (err != nil) != tt.wantErr {
t.Errorf("DeleteTag() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -482,7 +482,7 @@ func TestDeleteUserSource(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeleteUserSource(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeleteUserSource(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeleteUserSource() error = %v, wantErr %v", err, tt.wantErr)
}
})

View File

@ -203,7 +203,7 @@ func TestDeleteUser(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := DeleteUser(tt.args.ctx, tt.args.id); (err != nil) != tt.wantErr {
if err := DeleteUser(tt.args.ctx, tt.args.id, false); (err != nil) != tt.wantErr {
t.Errorf("DeleteUser() error = %v, wantErr %v", err, tt.wantErr)
}
})