fix:#49 test rewrite

This commit is contained in:
Elmar Kresse
2024-10-19 16:41:25 +02:00
parent 84bc504734
commit b9bd7f52c0

View File

@ -191,14 +191,14 @@ func Test_generateRoomLinksForGoogleCalendar(t *testing.T) {
args: args{ args: args{
rooms: "A123, ZU423, C789", rooms: "A123, ZU423, C789",
}, },
want: "Orte: \n<a href=\"https://map.htwk-leipzig.de/room/A123\"> A123 </a>\n<a href=\"https://map.htwk-leipzig.de/room/ZU423\"> ZU423 </a>\n<a href=\"https://map.htwk-leipzig.de/room/C789\"> C789 </a>\n", want: "Orte: <a href=\"https://map.htwk-leipzig.de/room/A123\"> A123 </a> <a href=\"https://map.htwk-leipzig.de/room/ZU423\"> ZU423 </a> <a href=\"https://map.htwk-leipzig.de/room/C789\"> C789 </a> ",
}, },
{ {
name: "Test 2", name: "Test 2",
args: args{ args: args{
rooms: "A123", rooms: "A123",
}, },
want: "Orte: \n<a href=\"https://map.htwk-leipzig.de/room/A123\"> A123 </a>\n", want: "Orte: <a href=\"https://map.htwk-leipzig.de/room/A123\"> A123 </a> ",
}, },
} }
for _, tt := range tests { for _, tt := range tests {
@ -306,7 +306,7 @@ func Test_generateDescription(t *testing.T) {
}, },
userAgent: "Google-Calendar-Importer", userAgent: "Google-Calendar-Importer",
}, },
description: "Profs: Dr. Smith\nGruppen: Math 101\nTyp: Lecture (mandatory)\nOrte: \n<a href=\"https://map.htwk-leipzig.de/room/ZU423\"> ZU423 </a>\n<a href=\"https://map.htwk-leipzig.de/room/FE231\"> FE231 </a>\n", description: "Profs: Dr. Smith\nGruppen: Math 101\nTyp: Lecture (mandatory)\nOrte: <a href=\"https://map.htwk-leipzig.de/room/ZU423\"> ZU423 </a> <a href=\"https://map.htwk-leipzig.de/room/FE231\"> FE231 </a> ",
altrep: "", altrep: "",
}, },
} }