commit a7f4e30a632ad9a176b57fbfe42e603fc900dd32
parent 6b99cb9e58cdf50b7a03a51f49a8e42b117d97af
Author: mtmn <miro@haravara.org>
Date: Sun, 19 Apr 2026 19:57:16 +0200
fix: add label to tests
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/test/Main.purs b/test/Main.purs
@@ -59,6 +59,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "rb", caaReleaseMbid: Nothing })
, genre: Just "Rock"
+ , label: Nothing
}
decodeJson (encodeJson meta) `shouldEqual` Right meta
@@ -71,6 +72,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Nothing
, mbidMapping: Nothing
, genre: Nothing
+ , label: Nothing
}
, listenedAt: Just 1600000000
}
@@ -132,6 +134,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "rb1", caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
, listenedAt: Just 12345
}
@@ -176,6 +179,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "mb1", caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
upsertScrobble conn listen
@@ -197,6 +201,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Nothing
, mbidMapping: Nothing
, genre: Nothing
+ , label: Nothing
}
}
upsertScrobble conn (mkListen 1 "Alpha")
@@ -219,6 +224,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "mb-label", caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
)
@@ -241,6 +247,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "mb-year", caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
)
@@ -260,6 +267,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Nothing
, mbidMapping: Nothing
, genre: Nothing
+ , label: Nothing
}
}
it "returns Nothing for an empty database" do
@@ -287,6 +295,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "R"
, mbidMapping: Just (MbidMapping { releaseMbid: Just mbid, caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
it "returns MBIDs not yet in release_metadata" do
@@ -319,6 +328,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Nothing
, mbidMapping: Nothing
, genre: Nothing
+ , label: Nothing
}
}
)
@@ -335,6 +345,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "R"
, mbidMapping: Just (MbidMapping { releaseMbid: Just mbid, caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
it "returns MBIDs whose genre is null in release_metadata" do
@@ -375,6 +386,7 @@ main = runSpecAndExitProcess [consoleReporter] do
, releaseName: Just "My Album"
, mbidMapping: Just (MbidMapping { releaseMbid: Just "ar-mbid", caaReleaseMbid: Nothing })
, genre: Nothing
+ , label: Nothing
}
}
)