|
@@ -54,7 +54,7 @@ func TestFindAllPanels(t *testing.T) {
|
54
|
54
|
|
55
|
55
|
panels, err := db.FindAllPanels()
|
56
|
56
|
if err != nil {
|
57
|
|
- t.Error("Error while searching for panels")
|
|
57
|
+ t.Error("Error while searching for panels", err)
|
58
|
58
|
}
|
59
|
59
|
if len(panels) != 1 {
|
60
|
60
|
t.Error("Should have found 1 panel, got", len(panels))
|
|
@@ -65,8 +65,8 @@ func TestFindPlaylistBySection(t *testing.T) {
|
65
|
65
|
initTestCase(t)
|
66
|
66
|
|
67
|
67
|
playlistEntries, err := db.FindPlaylistBySection("Viikko 07")
|
68
|
|
- if err != nil {
|
69
|
|
- t.Error("Error while searching for playlist")
|
|
68
|
+ if err == nil || err.Error() != "sql: no rows in result set" {
|
|
69
|
+ t.Error("err should be 'sql: no rows in result set'")
|
70
|
70
|
}
|
71
|
71
|
if len(playlistEntries) != 0 {
|
72
|
72
|
t.Error("Should have found 0 playlistEntries, got", len(playlistEntries))
|