Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jun 7, 2024
1 parent e844eba commit bfad6f0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/elixir_calendar_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@ defmodule ElixirCalendarTest do
assert [[date]] == query("select @1", [%P{name: "@1", value: date}])
end

test "Elixir.Date insert nil value" do
:ok = query("CREATE TABLE #date_test (x date)", [])

Check failure on line 76 in test/elixir_calendar_test.exs

View workflow job for this annotation

GitHub Actions / Unit Tests (mssql/server:2017-latest, 23.3, 1.13.4)

** (CompileError) test/elixir_calendar_test.exs:76: undefined variable "context"

Check failure on line 76 in test/elixir_calendar_test.exs

View workflow job for this annotation

GitHub Actions / Unit Tests (mssql/server:2022-latest, 23.3, 1.13.4)

** (CompileError) test/elixir_calendar_test.exs:76: undefined variable "context"

Check failure on line 76 in test/elixir_calendar_test.exs

View workflow job for this annotation

GitHub Actions / Unit Tests (azure-sql-edge:latest, 23.3, 1.13.4)

** (CompileError) test/elixir_calendar_test.exs:76: undefined variable "context"

Check failure on line 76 in test/elixir_calendar_test.exs

View workflow job for this annotation

GitHub Actions / Unit Tests (mssql/server:2022-latest, 24.3, 1.14.4, lint)

** (CompileError) test/elixir_calendar_test.exs:76: undefined variable "context"

query("insert into #date_test values (@param1), (@param2)", [
%Tds.Parameter{
name: "@param1",
value: ~D[2024-01-01]
},
%Tds.Parameter{
name: "@param2",
value: nil
}
])

assert [[~D[2024-01-01]], [nil]] = query("select x from #date_test", [])
end

test "Elixir.NaiveDateTime type", context do
# sql server datetime precision is not exacly 3 decimals precise, value is rader
# round up to nearest .000, .003, .007. In case of near midnigh day is incremented
Expand Down

0 comments on commit bfad6f0

Please sign in to comment.