Update dependencies
ex_slop 0.4.1 => 0.4.2 Introduces a new check around misusing the `length/1` function which require widespread fixes.
This commit is contained in:
@@ -360,7 +360,7 @@ defmodule MusicLibraryWeb.Components.ChatTest do
|
||||
# contains two user rows with the same content.
|
||||
reloaded = Chats.get_chat!(chat.id)
|
||||
user_messages = Enum.filter(reloaded.messages, &(&1.role == "user"))
|
||||
assert length(user_messages) == 2
|
||||
assert Enum.count_until(user_messages, 3) == 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -78,7 +78,7 @@ defmodule MusicLibraryWeb.ErrorControllerTest do
|
||||
assert %{"errors" => returned, "total" => 3, "limit" => 50, "offset" => 0} =
|
||||
json_response(conn, 200)
|
||||
|
||||
assert length(returned) == 3
|
||||
assert Enum.count_until(returned, 4) == 3
|
||||
|
||||
# Verify each returned error has the expected fields
|
||||
for error <- returned do
|
||||
@@ -138,7 +138,7 @@ defmodule MusicLibraryWeb.ErrorControllerTest do
|
||||
assert %{"errors" => returned, "total" => 3, "limit" => 2, "offset" => 1} =
|
||||
json_response(conn, 200)
|
||||
|
||||
assert length(returned) == 2
|
||||
assert Enum.count_until(returned, 3) == 2
|
||||
end
|
||||
|
||||
test "returns empty list when no errors match", %{conn: conn} do
|
||||
@@ -224,7 +224,7 @@ defmodule MusicLibraryWeb.ErrorControllerTest do
|
||||
|
||||
# Occurrences
|
||||
occurrences = returned["occurrences"]
|
||||
assert length(occurrences) == 2
|
||||
assert Enum.count_until(occurrences, 3) == 2
|
||||
|
||||
# Most recent first (desc inserted_at)
|
||||
first_occ = hd(occurrences)
|
||||
@@ -240,7 +240,7 @@ defmodule MusicLibraryWeb.ErrorControllerTest do
|
||||
|
||||
# Stacktrace lines
|
||||
lines = first_occ["stacktrace"]["lines"]
|
||||
assert length(lines) == 2
|
||||
assert Enum.count_until(lines, 3) == 2
|
||||
[line1, line2] = lines
|
||||
|
||||
assert line1["module"] == "OtherModule"
|
||||
|
||||
@@ -680,7 +680,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do
|
||||
|
||||
# Verify exactly two distinct import jobs were enqueued
|
||||
enqueued = all_enqueued(worker: ImportFromMusicbrainzRelease)
|
||||
assert length(enqueued) == 2
|
||||
assert Enum.count_until(enqueued, 3) == 2
|
||||
assert Enum.all?(enqueued, & &1.args["release_id"])
|
||||
|
||||
# No records should have been inserted synchronously
|
||||
|
||||
@@ -176,7 +176,7 @@ defmodule MusicLibraryWeb.ScrobbledTracksLive.RulePickerTest do
|
||||
assert_has(session, "#rule-picker-modal")
|
||||
|
||||
# Only the original rule exists, no duplicate was created
|
||||
assert length(ScrobbleRules.list_scrobble_rules(type: :album)) == 1
|
||||
assert Enum.count_until(ScrobbleRules.list_scrobble_rules(type: :album), 2) == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -217,7 +217,7 @@ defmodule MusicLibraryWeb.LiveHelpers.RecordActionsTest do
|
||||
|
||||
updated = Records.get_record!(record.id)
|
||||
# FakeColorExtractor returns a fixed 5-color palette
|
||||
assert length(updated.dominant_colors) == 5
|
||||
assert Enum.count_until(updated.dominant_colors, 6) == 5
|
||||
end
|
||||
|
||||
@tag :capture_log
|
||||
|
||||
Reference in New Issue
Block a user