Count unique catalog entries in collection summary
The record_count now reflects the number of grouped catalog lines the model sees, not raw DB rows. Two copies of the same album on different formats count as 1 catalog entry.
This commit is contained in:
@@ -366,7 +366,7 @@ defmodule MusicLibrary.CollectionTest do
|
||||
{summary, record_count} = Collection.collection_summary()
|
||||
lines = String.split(summary, "\n")
|
||||
|
||||
assert record_count == 2
|
||||
assert record_count == 1
|
||||
assert length(lines) == 1
|
||||
assert hd(lines) =~ "cd/vinyl"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user