File size: 1,257 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should create a channel if user is owner 1`] = `
Object {
"data": Object {
"createChannel": Object {
"description": "test description",
"isPrivate": false,
"name": "test channel",
"slug": "test-channel",
},
},
}
`;
exports[`should prevent duplicate channel slugs in the same community 1`] = `
Object {
"data": Object {
"createChannel": null,
},
"errors": Array [
[GraphQLError: A channel with this slug already exists.],
],
}
`;
exports[`should prevent moderators from creating a channel 1`] = `
Object {
"data": Object {
"createChannel": null,
},
"errors": Array [
[GraphQLError: You don't have permission to create a channel in this community.],
],
}
`;
exports[`should prevent non owners from creating a channel 1`] = `
Object {
"data": Object {
"createChannel": null,
},
"errors": Array [
[GraphQLError: You don't have permission to create a channel in this community.],
],
}
`;
exports[`should prevent signed out users from creating a channel 1`] = `
Object {
"data": Object {
"createChannel": null,
},
"errors": Array [
[GraphQLError: You must be signed in to create a new community.],
],
}
`;
|