feat(pages): add /application/[guildId]/[channelId]
(#4)
This commit is contained in:
14
cypress/fixtures/channels/[channelId]/get.ts
Normal file
14
cypress/fixtures/channels/[channelId]/get.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { Handler } from '../../handler'
|
||||
|
||||
import { channelExample } from '../channel'
|
||||
|
||||
export const getChannelWithChannelIdHandler: Handler = {
|
||||
method: 'GET',
|
||||
url: `/channels/${channelExample.id}`,
|
||||
response: {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
channel: channelExample
|
||||
}
|
||||
}
|
||||
}
|
15
cypress/fixtures/channels/[channelId]/messages/get.ts
Normal file
15
cypress/fixtures/channels/[channelId]/messages/get.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Handler } from '../../../handler'
|
||||
import {
|
||||
messageExampleComplete,
|
||||
messageExampleComplete2
|
||||
} from '../../../messages/message'
|
||||
import { channelExample } from '../../channel'
|
||||
|
||||
export const getMessagesWithChannelIdHandler: Handler = {
|
||||
method: 'GET',
|
||||
url: `/channels/${channelExample.id}/messages`,
|
||||
response: {
|
||||
statusCode: 200,
|
||||
body: [messageExampleComplete, messageExampleComplete2]
|
||||
}
|
||||
}
|
@ -1,9 +1,15 @@
|
||||
import { guild } from '../guilds/guild'
|
||||
import { guildExample } from '../guilds/guild'
|
||||
|
||||
export const channel = {
|
||||
export const channelExample = {
|
||||
id: 1,
|
||||
name: 'general',
|
||||
guildId: guild.id,
|
||||
guildId: guildExample.id,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
|
||||
export const channelExample2 = {
|
||||
...channelExample,
|
||||
id: 2,
|
||||
name: 'general2'
|
||||
}
|
||||
|
Reference in New Issue
Block a user