add a test

This commit is contained in:
Yanick Champoux 2023-11-13 10:00:55 -05:00
parent 8e5df8fbf0
commit 67c4d58b9d

View File

@ -20,8 +20,8 @@ subtest basic => sub {
ok not $s->{data}{attributes};
like $s,
{ data => {
like $s => {
data => {
id => 1,
type => 'thing',
relationships =>
@ -29,7 +29,7 @@ subtest basic => sub {
},
included =>
[ { type => 'subthing', id => 2, attributes => { x => 10 } }, ]
};
};
};
@ -38,10 +38,24 @@ subtest "don't repeat includes" => sub {
'thing',
[
{ id => 1,
subthings => [ { id => 2, x => 10 }, { id => 3, y => 20 } ]
subthings => [
{ id => 2,
x => 10
},
{ id => 3,
y => 20
}
]
},
{ id => 2,
subthings => [ { id => 3, y => 20 }, { id => 2, x => 10 } ]
subthings => [
{ id => 3,
y => 20
},
{ id => 2,
x => 10
}
]
}
]
);