Skip to content

Commit

Permalink
Merge pull request #7 from panter/f/userroles
Browse files Browse the repository at this point in the history
chore: test should treat UserRole as resource
  • Loading branch information
macrozone authored May 1, 2020
2 parents bb09a76 + 71e9932 commit fe49bff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
18 changes: 3 additions & 15 deletions packages/dataprovider/src/getResponseParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,12 @@ const testListTypes = (type: string) => {
{
id: "user1",
firstName: "firstName1",
roles: [
{
id: "admin",
},
],
roles: ["admin"],
},
{
id: "post2",
firstName: "firstName2",
roles: [
{
id: "admin",
},
],
roles: ["admin"],
},
],
total: 100,
Expand Down Expand Up @@ -98,11 +90,7 @@ const testSingleTypes = (type: string) => {
data: {
id: "user1",
firstName: "firstName1",
roles: [
{
id: "admin",
},
],
roles: ["admin"],
},
});
});
Expand Down
7 changes: 6 additions & 1 deletion packages/dataprovider/test-data/testSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ const UserRole = objectType({
t.model.id();
},
});
const types = [User, UserRole, addCrudResolvers("User")];
const types = [
User,
UserRole,
addCrudResolvers("User"),
addCrudResolvers("UserRole"),
];
export const testSchema = makeSchema({
types,
plugins: [
Expand Down

0 comments on commit fe49bff

Please sign in to comment.