Use JSON date serializer

Effective API changes:

  - nil serializes to null, not empty string
  - dates serialize to IETF RFC 3339 with millisecond precision, not
    second precision surrounded by spaces
This commit is contained in:
Andrew Kvalheim 2022-09-28 09:34:01 -07:00
parent b60257ef59
commit 397341a324
4 changed files with 8 additions and 15 deletions

View file

@ -12,7 +12,7 @@ describe EventScheduleSerializer, type: :serializer do
it 'sets date and room' do
expected_json = {
date: ' 2000-01-02T03:04:05+0000 ',
date: '2000-01-02T03:04:05.000Z',
room: event_schedule.room.guid
}.to_json