Adapt serializer specs to the new format
This commit is contained in:
parent
ac3be77219
commit
4256cdc06b
5 changed files with 122 additions and 138 deletions
|
|
@ -8,11 +8,9 @@ describe SpeakerSerializer, type: :serializer do
|
|||
context 'speaker does not have biography' do
|
||||
it 'sets name and affiliation' do
|
||||
expected_json = {
|
||||
speaker: {
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: nil
|
||||
}
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: nil
|
||||
}.to_json
|
||||
|
||||
expect(serializer.to_json).to eq expected_json
|
||||
|
|
@ -24,11 +22,9 @@ describe SpeakerSerializer, type: :serializer do
|
|||
|
||||
it 'sets name, affiliation and biography' do
|
||||
expected_json = {
|
||||
speaker: {
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: 'Doest of all Jon Does'
|
||||
}
|
||||
name: 'John Doe',
|
||||
affiliation: 'JohnDoesInc',
|
||||
biography: 'Doest of all Jon Does'
|
||||
}.to_json
|
||||
|
||||
expect(serializer.to_json).to eq expected_json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue