warning: a struct for Pleroma.Marker is expected on struct update:
%Pleroma.Marker{refresh_record(marker) | unread_count: 2}
but got type:
dynamic()
where "marker" was given the type:
# type: dynamic()
# from: test/pleroma/marker_test.exs:35:14
marker = Pleroma.Factory.insert(:marker, user: user)
you must assign "refresh_record(marker)" to variable and pattern match on "%Pleroma.Marker{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
43 │ ) == [%Marker{refresh_record(marker) | unread_count: 2}]
│ ~
│
└─ test/pleroma/marker_test.exs:43:20: Pleroma.MarkerTest."test get_markers/2 returns user markers"/1
|
||
|---|---|---|
| .. | ||
| config | ||
| credo/check/consistency | ||
| fixtures | ||
| instance_static | ||
| mix | ||
| pleroma | ||
| support | ||
| test_helper.exs | ||