Add URLs to API responses

Resolves inability of API consumers to provide links to OSEM.
This commit is contained in:
Andrew Kvalheim 2022-10-27 12:57:42 -07:00
parent 5b89f64eaf
commit e01fd2d721
6 changed files with 27 additions and 3 deletions

View file

@ -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'