mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Scaffold some tests for disabledBy relation
This commit is contained in:
parent
f644507e4f
commit
420ea8a4d6
@ -200,3 +200,49 @@ describe('DeletePost', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('AddPostDisabledBy', () => {
|
||||
const mutation = `
|
||||
mutation {
|
||||
AddPostDisabledBy(from: { id: "u8" }, to: { id: "p9" }) {
|
||||
from {
|
||||
id
|
||||
}
|
||||
to {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('authenticated', () => {
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('as moderator', () => {
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('current user matches provided user', () => {
|
||||
it.todo('sets current user')
|
||||
it.todo('updates .disabled on post')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('RemovePostDisabledBy', () => {
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('authenticated', () => {
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('as moderator', () => {
|
||||
it.todo('throws authorization error')
|
||||
|
||||
describe('current user matches provided user', () => {
|
||||
it.todo('sets current user')
|
||||
it.todo('updates .disabled on post')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -133,6 +133,7 @@ type Post {
|
||||
visibility: VisibilityEnum
|
||||
deleted: Boolean
|
||||
disabled: Boolean
|
||||
disabledBy: User! @relation(name: "DISABLED", direction: "IN")
|
||||
createdAt: String
|
||||
updatedAt: String
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user