refactor(member-live): modularize the overview and drop the superseded in-memory paths

Extract the cookie parser, export-payload builder and fee-status helper
into their own modules and remove the filter/sort/load helpers the
database pushdown made dead, so the overview LiveView stays a thin
coordinator over focused units.
This commit is contained in:
Simon 2026-07-06 10:54:09 +02:00
parent c2cb3edab8
commit 77fc11a0b0
17 changed files with 375 additions and 875 deletions

View file

@ -0,0 +1,22 @@
defmodule MvWeb.MemberLive.Index.CookieTest do
@moduledoc """
Tests for the shared cookie-header parser used by the overview persistence chain.
"""
use ExUnit.Case, async: true
alias MvWeb.MemberLive.Index.Cookie
describe "parse_header/1" do
test "splits pairs and URL-decodes values" do
assert Cookie.parse_header("a=1; b=hello%20world") == %{"a" => "1", "b" => "hello world"}
end
test "maps a valueless entry to an empty string" do
assert Cookie.parse_header("flag; a=1") == %{"flag" => "", "a" => "1"}
end
test "keeps only the first '=' as the separator" do
assert Cookie.parse_header("token=a=b=c") == %{"token" => "a=b=c"}
end
end
end