mitgliederverwaltung/test/mv/constants_test.exs

33 lines
1,013 B
Elixir

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