-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2023-2024, NeKz | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
import { assert } from 'testing/asserts.ts'; | ||
|
||
const MEL_BOARD_DOMAIN = Deno.env.get('MEL_BOARD_DOMAIN')!; | ||
const MEL_BOARD_API_TOKEN = Deno.env.get('MEL_BOARD_API_TOKEN')!; | ||
|
||
Deno.test('Can set autorender on board.portal2.local', async () => { | ||
if (!MEL_BOARD_API_TOKEN) { | ||
return console.log('Mel board disabled. Skipped test.'); | ||
} | ||
|
||
const res = await fetch(`https://${MEL_BOARD_DOMAIN}/api-v3/set-autorender`, { | ||
method: 'POST', | ||
headers: { | ||
'Authorization': `Bearer ${MEL_BOARD_API_TOKEN}`, | ||
'Content-Type': 'application/json', | ||
'User-Agent': Deno.env.get('USER_AGENT')!, | ||
}, | ||
body: JSON.stringify({ | ||
changelog_id: -1, | ||
autorender_id: '0123456789A', | ||
}), | ||
}); | ||
|
||
assert(res.ok); | ||
|
||
const status = await res.json(); | ||
assert(status); | ||
assert(status.affected === 0); | ||
}); |