From 0e87b433394527b4216d831160431193f7504e42 Mon Sep 17 00:00:00 2001 From: soxx Date: Tue, 28 Jan 2025 14:04:51 +0100 Subject: [PATCH] fix: change tests to accept the bools for hard deletion --- pkg/database/favorite_test.go | 4 ++-- pkg/database/pool_test.go | 2 +- pkg/database/post_report_test.go | 2 +- pkg/database/post_test.go | 2 +- pkg/database/source_test.go | 2 +- pkg/database/tag_test.go | 2 +- pkg/database/userSource_test.go | 2 +- pkg/database/user_test.go | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/database/favorite_test.go b/pkg/database/favorite_test.go index 4291fc8..dd7b384 100644 --- a/pkg/database/favorite_test.go +++ b/pkg/database/favorite_test.go @@ -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) } }) diff --git a/pkg/database/pool_test.go b/pkg/database/pool_test.go index 4346f7c..ce21e63 100644 --- a/pkg/database/pool_test.go +++ b/pkg/database/pool_test.go @@ -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) } }) diff --git a/pkg/database/post_report_test.go b/pkg/database/post_report_test.go index 9b4619e..5598bd1 100644 --- a/pkg/database/post_report_test.go +++ b/pkg/database/post_report_test.go @@ -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) } }) diff --git a/pkg/database/post_test.go b/pkg/database/post_test.go index 41b6159..f3a7364 100644 --- a/pkg/database/post_test.go +++ b/pkg/database/post_test.go @@ -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) } }) diff --git a/pkg/database/source_test.go b/pkg/database/source_test.go index 54bfec4..db637ac 100644 --- a/pkg/database/source_test.go +++ b/pkg/database/source_test.go @@ -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) } }) diff --git a/pkg/database/tag_test.go b/pkg/database/tag_test.go index 1e81c55..0a90b3f 100644 --- a/pkg/database/tag_test.go +++ b/pkg/database/tag_test.go @@ -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) } }) diff --git a/pkg/database/userSource_test.go b/pkg/database/userSource_test.go index 787a7b8..b8e3fd5 100644 --- a/pkg/database/userSource_test.go +++ b/pkg/database/userSource_test.go @@ -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) } }) diff --git a/pkg/database/user_test.go b/pkg/database/user_test.go index a1326ce..b51b444 100644 --- a/pkg/database/user_test.go +++ b/pkg/database/user_test.go @@ -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) } })