mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
b60257ef59
commit
397341a324
4 changed files with 8 additions and 15 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ describe EventSerializer, type: :serializer do
|
|||
guid: event.guid,
|
||||
title: 'Some Talk',
|
||||
length: 30,
|
||||
scheduled_date: '',
|
||||
scheduled_date: nil,
|
||||
language: nil,
|
||||
abstract: 'Lorem ipsum dolor sit amet',
|
||||
speaker_ids: event.speaker_ids,
|
||||
|
|
@ -41,7 +41,7 @@ describe EventSerializer, type: :serializer do
|
|||
guid: event.guid,
|
||||
title: 'Some Talk',
|
||||
length: 30,
|
||||
scheduled_date: ' 2014-03-04T09:00:00+0000 ',
|
||||
scheduled_date: '2014-03-04T09:00:00.000Z',
|
||||
language: 'English',
|
||||
abstract: 'Lorem ipsum dolor sit amet',
|
||||
speaker_ids: [speaker.id],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue