Use Ecto.UUID instead of hand-rolled type
This commit is contained in:
@@ -108,7 +108,7 @@ defmodule MusicLibrary.ScrobbleRules.ScrobbleRuleTest do
|
||||
changeset = ScrobbleRule.changeset(%ScrobbleRule{}, attrs)
|
||||
refute changeset.valid?
|
||||
|
||||
assert "must be a valid MusicBrainz ID (UUID format)" in errors_on(changeset).target_musicbrainz_id
|
||||
assert "is invalid" in errors_on(changeset).target_musicbrainz_id
|
||||
end
|
||||
|
||||
test "valid changeset with uppercase UUID" do
|
||||
|
||||
@@ -162,7 +162,7 @@ defmodule MusicLibraryWeb.ScrobbleRulesLiveTest do
|
||||
target_musicbrainz_id: "invalid-uuid"
|
||||
}
|
||||
)
|
||||
|> render_change() =~ "must be a valid MusicBrainz ID"
|
||||
|> render_change() =~ "is invalid"
|
||||
end
|
||||
|
||||
test "updates form labels based on rule type", %{conn: conn} do
|
||||
|
||||
Reference in New Issue
Block a user