File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,12 +158,23 @@ func TestBot_Logger(t *testing.T) {
158158}
159159
160160func TestBot_FileDownloadURL (t * testing.T ) {
161- bot , err := NewBot (token )
162- require .NoError (t , err )
161+ t .Run ("regular" , func (t * testing.T ) {
162+ bot , err := NewBot (token )
163+ require .NoError (t , err )
163164
164- filepath := "file.txt"
165- url := bot .FileDownloadURL (filepath )
166- assert .Equal (t , bot .apiURL + "/file" + botPathPrefix + bot .token + "/" + filepath , url )
165+ filepath := "file.txt"
166+ url := bot .FileDownloadURL (filepath )
167+ assert .Equal (t , bot .apiURL + "/file" + botPathPrefix + bot .token + "/" + filepath , url )
168+ })
169+
170+ t .Run ("test" , func (t * testing.T ) {
171+ bot , err := NewBot (token , WithTestServerPath ())
172+ require .NoError (t , err )
173+
174+ filepath := "file.txt"
175+ url := bot .FileDownloadURL (filepath )
176+ assert .Equal (t , bot .apiURL + "/file" + botPathPrefix + bot .token + "/test/" + filepath , url )
177+ })
167178}
168179
169180type testErrorMarshal struct {
You can’t perform that action at this time.
0 commit comments