Skip to content

Commit a6acaaf

Browse files
committed
tests: more type TType tests
1 parent bc5fdf0 commit a6acaaf

File tree

8 files changed

+11
-24
lines changed

8 files changed

+11
-24
lines changed

.github/workflows/dev.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,4 @@ jobs:
3838
if: always()
3939
with:
4040
token: ${{secrets.CODECOV_TOKEN}}
41-
file: ./resources/cover/cover.out
42-
43-
- name: Go cover diff
44-
uses: kskitek/[email protected]
45-
if: always()
41+
file: ./resources/cover/cover.out

.github/workflows/go.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,4 @@ jobs:
5050
if: always()
5151
with:
5252
token: ${{secrets.CODECOV_TOKEN}}
53-
file: ./resources/cover/cover.out
54-
55-
- name: Go cover diff
56-
uses: kskitek/[email protected]
57-
if : always()
53+
file: ./resources/cover/cover.out

.github/workflows/pr.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,3 @@ jobs:
8686
with:
8787
token: ${{secrets.CODECOV_TOKEN}}
8888
file: ./resources/cover/cover.out
89-
90-
- name: Go cover diff
91-
uses: kskitek/[email protected]
92-
if: always()

boosts.go

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type ChatBoostUpdated struct {
1414
func (c *ChatBoostUpdated) ReflectType() string {
1515
return fmt.Sprintf("%T", c)
1616
}
17-
1817
func (c *ChatBoostUpdated) Type() string {
1918
return "ChatBoostUpdated"
2019
}
@@ -37,7 +36,6 @@ type ChatBoostRemoved struct {
3736
func (c *ChatBoostRemoved) ReflectType() string {
3837
return fmt.Sprintf("%T", c)
3938
}
40-
4139
func (c *ChatBoostRemoved) Type() string {
4240
return "ChatBoostRemoved"
4341
}

join_request.go

-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package telebot
22

33
import (
44
"fmt"
5-
"strconv"
65
)
76

87
// ChatJoinRequest represents a join request sent to a chat.
@@ -29,10 +28,6 @@ type ChatJoinRequest struct {
2928
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
3029
}
3130

32-
func (c *ChatJoinRequest) Recipient() string {
33-
return strconv.FormatInt(c.Chat.ID, 10)
34-
}
35-
3631
func (c *ChatJoinRequest) ReflectType() string {
3732
return fmt.Sprintf("%T", c)
3833
}

recipient.go

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ func (c *Chat) Recipient() string {
1313
func (u *User) Recipient() string {
1414
return strconv.FormatInt(u.ID, 10)
1515
}
16+
17+
func (c *ChatJoinRequest) Recipient() string {
18+
return strconv.FormatInt(c.Chat.ID, 10)
19+
}

tt_types_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ var (
8383
&Contact{},
8484
&Dice{},
8585
&Game{},
86-
&Poll{},
87-
8886
&PollOption{},
89-
&PollAnswer{},
9087

9188
&Venue{},
9289
&Location{},

verify_func.go

+5
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ func (i *SwitchInlineQueryChosenChat) Verify() error { return verify(i) }
5656
func (i *KeyboardButtonRequestChat) Verify() error { return verify(i) }
5757
func (i *KeyboardButtonRequestUsers) Verify() error { return verify(i) }
5858
func (i *KeyboardButtonPollType) Verify() error { return verify(i) }
59+
60+
func (c *ChatBoostRemoved) Verify() error { return verify(c) }
61+
func (c *ChatBoostUpdated) Verify() error { return verify(c) }
62+
63+
func (c *ChatJoinRequest) Verify() error { return verify(c) }

0 commit comments

Comments
 (0)