Skip to content
Open
16 changes: 11 additions & 5 deletions tests/integration/routes/account/put-account-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,17 @@ getServer(function (error, server) {
}])

var options = _.defaultsDeep({
url: '/session/account?include=profile'
url: '/session/account?include=profile',
payload: {
data: {
attributes: {
profile: {
fullName: 'pat Doe',
email: '[email protected]'
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}, routeOptions)

var accountWithProfileFixture = require('../../fixtures/account-with-profile.json')
Expand All @@ -98,10 +108,6 @@ getServer(function (error, server) {
response.result.data.id = 'userid123'
response.result.data.relationships.profile.data.id = 'userid123-profile'
response.result.included[0].id = 'userid123-profile'
response.result.included[0].attributes = {
fullName: 'pat Doe',
email: '[email protected]'
}
t.deepEqual(response.result, accountWithProfileFixture, 'returns account in right format')
t.end()
})
Expand Down