test: fix tests after join_date validation and UI changes
Update test to expect join_date validation error. Fix toggle button selector in cycle view test. Remove unnecessary cleanup from create_cycle helper.
This commit is contained in:
parent
77ac3d1b18
commit
6f568bfe54
3 changed files with 9 additions and 12 deletions
|
|
@ -49,9 +49,12 @@ defmodule Mv.Membership.MemberTest do
|
|||
assert {:ok, _member} = Membership.create_member(attrs2)
|
||||
end
|
||||
|
||||
test "Join date can be in the future" do
|
||||
test "Join date cannot be in the future" do
|
||||
attrs = Map.put(@valid_attrs, :join_date, Date.utc_today() |> Date.add(1))
|
||||
assert {:ok, _member} = Membership.create_member(attrs)
|
||||
|
||||
assert {:error,
|
||||
%Ash.Error.Invalid{errors: [%Ash.Error.Changes.InvalidAttribute{field: :join_date}]}} =
|
||||
Membership.create_member(attrs)
|
||||
end
|
||||
|
||||
test "Exit date is optional but must not be before join date if both are specified" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue