Skip to content

Commit b87c609

Browse files
committed
style: use factory to instanciate Share in tests
1 parent 67b4316 commit b87c609

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

hupload/internal/storage/minio_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,8 @@ func TestMinioListShares(t *testing.T) {
234234
}
235235

236236
want := []storage.Share{
237-
{
238-
Version: 1,
239-
Name: "Test2",
240-
Owner: "admin",
241-
Options: storage.DefaultOptions(),
242-
},
243-
{
244-
Version: 1,
245-
Name: "Test1",
246-
Owner: "admin",
247-
Options: storage.DefaultOptions(),
248-
},
237+
*storage.NewShare().WithName("Test2").WithOwner("admin").WithOptions(storage.DefaultOptions()),
238+
*storage.NewShare().WithName("Test1").WithOwner("admin").WithOptions(storage.DefaultOptions()),
249239
}
250240

251241
if !reflect.DeepEqual(got, want) {

0 commit comments

Comments
 (0)