aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction_handlers_test.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-16 16:03:54 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-16 16:05:25 -0700
commit0ed5132769e88cb385b5240986b706430f0ccd72 (patch)
treebd622161546d9db3293ba69afc9646bcdb24b2f4 /hotline/transaction_handlers_test.go
parentf6f1d88969e12eadb7013397cdad3c4c5625988c (diff)
Fix broken io.Reader implementations
Diffstat (limited to 'hotline/transaction_handlers_test.go')
-rw-r--r--hotline/transaction_handlers_test.go50
1 files changed, 33 insertions, 17 deletions
diff --git a/hotline/transaction_handlers_test.go b/hotline/transaction_handlers_test.go
index 2420649..9c0359f 100644
--- a/hotline/transaction_handlers_test.go
+++ b/hotline/transaction_handlers_test.go
@@ -3191,10 +3191,8 @@ func TestHandleDelNewsItem(t *testing.T) {
Server: &Server{
ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{
"test": {
- Type: [2]byte{0, 3},
- Count: nil,
- NameSize: 0,
- Name: "zz",
+ Type: [2]byte{0, 3},
+ Name: "zz",
},
}},
},
@@ -3237,10 +3235,8 @@ func TestHandleDelNewsItem(t *testing.T) {
Server: &Server{
ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{
"testcat": {
- Type: [2]byte{0, 2},
- Count: nil,
- NameSize: 0,
- Name: "test",
+ Type: [2]byte{0, 2},
+ Name: "test",
},
}},
},
@@ -3293,10 +3289,8 @@ func TestHandleDelNewsItem(t *testing.T) {
}(),
ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{
"testcat": {
- Type: [2]byte{0, 2},
- Count: nil,
- NameSize: 0,
- Name: "test",
+ Type: [2]byte{0, 2},
+ Name: "test",
},
}},
},
@@ -3781,11 +3775,9 @@ func TestHandleNewNewsFldr(t *testing.T) {
}(),
ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{
"test": {
- Type: [2]byte{0, 2},
- Count: nil,
- NameSize: 0,
- Name: "test",
- SubCats: make(map[string]NewsCategoryListData15),
+ Type: [2]byte{0, 2},
+ Name: "test",
+ SubCats: make(map[string]NewsCategoryListData15),
},
}},
},
@@ -3885,3 +3877,27 @@ func TestHandleNewNewsFldr(t *testing.T) {
})
}
}
+
+func TestHandleDownloadBanner(t *testing.T) {
+ type args struct {
+ cc *ClientConn
+ t *Transaction
+ }
+ tests := []struct {
+ name string
+ args args
+ wantRes []Transaction
+ wantErr assert.ErrorAssertionFunc
+ }{
+ // TODO: Add test cases.
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ gotRes, err := HandleDownloadBanner(tt.args.cc, tt.args.t)
+ if !tt.wantErr(t, err, fmt.Sprintf("HandleDownloadBanner(%v, %v)", tt.args.cc, tt.args.t)) {
+ return
+ }
+ assert.Equalf(t, tt.wantRes, gotRes, "HandleDownloadBanner(%v, %v)", tt.args.cc, tt.args.t)
+ })
+ }
+}