Add test for foreign key in relationship constructor