bitwalker / timex_ecto

An adapter for using Timex DateTimes with Ecto
MIT License
162 stars 68 forks source link

Uptick to ecto 2.2, and looking at fixing up the tests #71

Closed aforward closed 6 years ago

aforward commented 6 years ago

I have upgraded to ecto 2.2, and wanted to bring this library along for the ride.

The tests were not running locally out of the box for me, so I made a few additional changes to help get them back on track.

I took insight from Question #133, as well as added a ecto_repos to the config.

Finally, I added () to timestamps to remove a warning.

11:06 timex_ecto (f/ecto22)$ mix test

11:06:32.368 [info]  Already up

11:06:32.418 [debug] QUERY OK db=4.5ms
INSERT INTO "users" ("date_test","datetime_test","datetimetz_test","name","time_test","timestamptz_test","inserted_at","updated_at") VALUES ($1,$2,$3,$4,$5,$6,$7,$8) RETURNING "id" [{2017, 9, 26}, {{2017, 9, 26}, {15, 6, 32, 374703}}, {{{2017, 9, 26}, {17, 6, 32, 374703}}, "Europe/Copenhagen"}, "Paul", {12, 30, 15, 120}, {{2017, 9, 26}, {15, 6, 32, 383857}}, {{2017, 9, 26}, {15, 6, 32, 0}}, {{2017, 9, 26}, {15, 6, 32, 0}}]

11:06:32.420 [debug] QUERY OK source="users" db=1.6ms decode=0.5ms
SELECT u0."id", u0."name", u0."date_test", u0."time_test", u0."datetime_test", u0."datetimetz_test", u0."timestamptz_test", u0."inserted_at", u0."updated_at" FROM "users" AS u0 []

11:06:32.424 [debug] QUERY OK source="users" db=2.5ms decode=0.5ms
SELECT u0."id", u0."name", u0."date_test", u0."time_test", u0."datetime_test", u0."datetimetz_test", u0."timestamptz_test", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."datetimetz_test" = $1::datetimetz) [{{{2017, 9, 26}, {17, 6, 32, 374703}}, "Europe/Copenhagen"}]
.............................

Finished in 0.5 seconds
29 tests, 0 failures

Randomized with seed 952809
bitwalker commented 6 years ago

Thanks for getting that sorted out! Much appreciated!