diff --git a/commands/uni_test.go b/commands/uni_test.go index bb66908..64f0e61 100644 --- a/commands/uni_test.go +++ b/commands/uni_test.go @@ -106,6 +106,7 @@ func TestGetTimeTable(t *testing.T) { courseName string year int day time.Time + curriculum string } tests := []struct { name string @@ -130,6 +131,7 @@ func TestGetTimeTable(t *testing.T) { courseName: "informatica", year: 1, day: time.Date(2023, 11, 20, 0, 0, 0, 0, time.UTC), + curriculum: "", }, want: `🕘`, }, @@ -155,7 +157,7 @@ func TestGetTimeTable(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := GetTimeTable(tt.args.courseType, tt.args.courseName, tt.args.year, tt.args.day) + got, err := GetTimeTable(tt.args.courseType, tt.args.courseName, tt.args.curriculum, tt.args.year, tt.args.day) if err != nil && !tt.error { t.Errorf("GetTimeTable() error = %v", err) return @@ -173,7 +175,7 @@ func TestGetTimeTable(t *testing.T) { func TestWeekend(t *testing.T) { date := time.Date(2023, 3, 11, 0, 0, 0, 0, time.UTC) - result, err := GetTimeTable("laurea", "informatica", 1, date) + result, err := GetTimeTable("laurea", "informatica", "", 1, date) if err != nil { t.Fatalf("Error while getting timetable: %s", err) } diff --git a/model/responses_test.go b/model/responses_test.go index 67a0294..f5c1504 100644 --- a/model/responses_test.go +++ b/model/responses_test.go @@ -3,6 +3,8 @@ package model import ( "reflect" "testing" + + tgbotapi "github.com/musianisamuele/telegram-bot-api" ) func TestCommandResponse_IsEmpty(t *testing.T) { @@ -161,7 +163,7 @@ func Test_makeResponse(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got := makeResponse(tt.args.text, tt.args.nextCommand); !reflect.DeepEqual(got, tt.want) { - t.Errorf("makeResponse() = %v, want %v", got, tt.want) + t.Errorf("makeResponse() = %v, want %v", got, tgbotapi.InlineKeyboardMarkup{}) } }) }