mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add URLs to API responses
Resolves inability of API consumers to provide links to OSEM.
This commit is contained in:
parent
5b89f64eaf
commit
e01fd2d721
6 changed files with 27 additions and 3 deletions
|
|
@ -9,6 +9,7 @@ describe EventSerializer, type: :serializer do
|
|||
it 'sets guid, title, length, abstract and type' do
|
||||
expected_json = {
|
||||
guid: event.guid,
|
||||
url: "http://localhost:3000/conferences/#{event.conference.short_title}/program/proposals/#{event.id}",
|
||||
title: 'Some Talk',
|
||||
length: 30,
|
||||
scheduled_date: '',
|
||||
|
|
@ -39,6 +40,7 @@ describe EventSerializer, type: :serializer do
|
|||
it 'sets guid, title, length, abstract, type, date, language, speakers, room and track' do
|
||||
expected_json = {
|
||||
guid: event.guid,
|
||||
url: "http://localhost:3000/conferences/#{event.conference.short_title}/program/proposals/#{event.id}",
|
||||
title: 'Some Talk',
|
||||
length: 30,
|
||||
scheduled_date: ' 2014-03-04T09:00:00+0000 ',
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ describe SpeakerSerializer, type: :serializer do
|
|||
context 'speaker does not have biography' do
|
||||
it 'sets name and affiliation' do
|
||||
expected_json = {
|
||||
url: "http://localhost:3000/users/#{speaker.id}",
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: nil
|
||||
|
|
@ -22,6 +23,7 @@ describe SpeakerSerializer, type: :serializer do
|
|||
|
||||
it 'sets name, affiliation and biography' do
|
||||
expected_json = {
|
||||
url: "http://localhost:3000/users/#{speaker.id}",
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: 'Doest of all Jon Does'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue