feat(date-filter): introduce DateFilter module with URL codec and Ash query expressions
This commit is contained in:
parent
143c0c5c24
commit
ddd4a9a878
7 changed files with 1195 additions and 0 deletions
33
test/mv/constants_test.exs
Normal file
33
test/mv/constants_test.exs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
defmodule Mv.ConstantsTest do
|
||||
@moduledoc """
|
||||
Tests for Mv.Constants accessor functions. Focus is on the date filter
|
||||
URL parameter prefixes that drive the bookmarkable filter state.
|
||||
"""
|
||||
use ExUnit.Case, async: true
|
||||
|
||||
describe "date filter URL param prefixes" do
|
||||
test "join_date_from_param/0 returns jd_from" do
|
||||
assert Mv.Constants.join_date_from_param() == "jd_from"
|
||||
end
|
||||
|
||||
test "join_date_to_param/0 returns jd_to" do
|
||||
assert Mv.Constants.join_date_to_param() == "jd_to"
|
||||
end
|
||||
|
||||
test "exit_date_mode_param/0 returns ed_mode" do
|
||||
assert Mv.Constants.exit_date_mode_param() == "ed_mode"
|
||||
end
|
||||
|
||||
test "exit_date_from_param/0 returns ed_from" do
|
||||
assert Mv.Constants.exit_date_from_param() == "ed_from"
|
||||
end
|
||||
|
||||
test "exit_date_to_param/0 returns ed_to" do
|
||||
assert Mv.Constants.exit_date_to_param() == "ed_to"
|
||||
end
|
||||
|
||||
test "custom_date_filter_prefix/0 returns cdf_" do
|
||||
assert Mv.Constants.custom_date_filter_prefix() == "cdf_"
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue