mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-06 03:34:57 +08:00
Improve assertion of the session creation timestamp
This commit is contained in:
parent
d59e2cf4b9
commit
d0338be513
2 changed files with 3 additions and 10 deletions
|
@ -124,7 +124,7 @@
|
|||
}
|
||||
|
||||
.switch-button {
|
||||
@apply relative inline-block w-14 h-7 mr-2 select-none transition;
|
||||
@apply relative inline-block w-14 h-7 mr-2 select-none;
|
||||
}
|
||||
|
||||
.switch-button--disabled {
|
||||
|
|
|
@ -781,16 +781,9 @@ defmodule Livebook.SessionTest do
|
|||
end
|
||||
end
|
||||
|
||||
test "session has created_at attribute when it is created", %{session: session} do
|
||||
assert Map.has_key?(session, :created_at)
|
||||
end
|
||||
|
||||
test "session created_at attribute is a date time", %{session: session} do
|
||||
test "session has the creation timestamp", %{session: session} do
|
||||
assert %DateTime{} = session.created_at
|
||||
end
|
||||
|
||||
test "session created_at is before now", %{session: session} do
|
||||
assert DateTime.compare(session.created_at, DateTime.utc_now()) == :lt
|
||||
assert DateTime.compare(session.created_at, DateTime.utc_now()) in [:lt, :eq]
|
||||
end
|
||||
|
||||
@tag :tmp_dir
|
||||
|
|
Loading…
Add table
Reference in a new issue