Fix tests to comply with the JSON API spec.

This commit is contained in:
Lucas Hosseini
2016-04-20 03:08:54 +02:00
parent 7485c8487e
commit ebda34b3d3
3 changed files with 9 additions and 6 deletions

View File

@@ -131,8 +131,9 @@ module ActiveModelSerializers
id: '1',
type: 'virtual-values',
relationships: {
maker: { data: { id: 1 } },
reviews: { data: [{ id: 1 }, { id: 2 }] }
maker: { data: { type: 'makers', id: '1' } },
reviews: { data: [{ type: 'reviews', id: '1' },
{ type: 'reviews', id: '2' }] }
}
}
}, adapter.serializable_hash)

View File

@@ -65,8 +65,9 @@ module ActiveModelSerializers
id: '1',
type: 'virtual-values',
relationships: {
maker: { data: { id: 1 } },
reviews: { data: [{ id: 1 }, { id: 2 }] }
maker: { data: { type: 'makers', id: '1' } },
reviews: { data: [{ type: 'reviews', id: '1' },
{ type: 'reviews', id: '2' }] }
}
}
}