|
|
@@ -1706,7 +1706,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
|
|
|
Success: wire.ICQStatusCodeOK,
|
|
|
ReqSubType: wire.ICQDBQueryMetaReplyAffiliations,
|
|
|
ICQ_0x07D0_0x041A_DBQueryMetaReqSetAffiliations: wire.ICQ_0x07D0_0x041A_DBQueryMetaReqSetAffiliations{
|
|
|
- PastAffiliations: []struct {
|
|
|
+ PastAffiliations: [3]struct {
|
|
|
Code uint16
|
|
|
Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
}{
|
|
|
@@ -1723,7 +1723,7 @@ func TestICQService_FullUserInfo(t *testing.T) {
|
|
|
Keyword: "Previous Job",
|
|
|
},
|
|
|
},
|
|
|
- Affiliations: []struct {
|
|
|
+ Affiliations: [3]struct {
|
|
|
Code uint16
|
|
|
Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
}{
|
|
|
@@ -1978,7 +1978,7 @@ func TestICQService_SetAffiliations(t *testing.T) {
|
|
|
seq: 1,
|
|
|
sess: newTestSession("100003", sessOptUIN(100003)),
|
|
|
req: wire.ICQ_0x07D0_0x041A_DBQueryMetaReqSetAffiliations{
|
|
|
- PastAffiliations: []struct {
|
|
|
+ PastAffiliations: [3]struct {
|
|
|
Code uint16
|
|
|
Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
}{
|
|
|
@@ -1995,7 +1995,7 @@ func TestICQService_SetAffiliations(t *testing.T) {
|
|
|
Keyword: "kw3",
|
|
|
},
|
|
|
},
|
|
|
- Affiliations: []struct {
|
|
|
+ Affiliations: [3]struct {
|
|
|
Code uint16
|
|
|
Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
}{
|
|
|
@@ -2067,32 +2067,6 @@ func TestICQService_SetAffiliations(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- name: "err: unexpected affiliations count",
|
|
|
- seq: 1,
|
|
|
- sess: newTestSession("100003", sessOptUIN(100003)),
|
|
|
- req: wire.ICQ_0x07D0_0x041A_DBQueryMetaReqSetAffiliations{
|
|
|
- PastAffiliations: []struct {
|
|
|
- Code uint16
|
|
|
- Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
- }{
|
|
|
- {
|
|
|
- Code: 1,
|
|
|
- Keyword: "kw1",
|
|
|
- },
|
|
|
- },
|
|
|
- Affiliations: []struct {
|
|
|
- Code uint16
|
|
|
- Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
- }{
|
|
|
- {
|
|
|
- Code: 4,
|
|
|
- Keyword: "kw4",
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- wantErr: errICQBadRequest,
|
|
|
- },
|
|
|
}
|
|
|
for _, tt := range tests {
|
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
|
@@ -2317,7 +2291,7 @@ func TestICQService_SetInterests(t *testing.T) {
|
|
|
seq: 1,
|
|
|
sess: newTestSession("100003", sessOptUIN(100003)),
|
|
|
req: wire.ICQ_0x07D0_0x0410_DBQueryMetaReqSetInterests{
|
|
|
- Interests: []struct {
|
|
|
+ Interests: [4]struct {
|
|
|
Code uint16
|
|
|
Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
}{
|
|
|
@@ -2389,27 +2363,6 @@ func TestICQService_SetInterests(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- name: "err: unexpected interest count",
|
|
|
- seq: 1,
|
|
|
- sess: newTestSession("100003", sessOptUIN(100003)),
|
|
|
- req: wire.ICQ_0x07D0_0x0410_DBQueryMetaReqSetInterests{
|
|
|
- Interests: []struct {
|
|
|
- Code uint16
|
|
|
- Keyword string `oscar:"len_prefix=uint16,nullterm"`
|
|
|
- }{
|
|
|
- {
|
|
|
- Code: 1,
|
|
|
- Keyword: "kw1",
|
|
|
- },
|
|
|
- {
|
|
|
- Code: 2,
|
|
|
- Keyword: "kw2",
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- wantErr: errICQBadRequest,
|
|
|
- },
|
|
|
}
|
|
|
for _, tt := range tests {
|
|
|
t.Run(tt.name, func(t *testing.T) {
|