mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 20:09:48 -05:00
21 lines
374 B
Bash
Executable file
21 lines
374 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
content="0nesh0t"
|
|
|
|
setup() {
|
|
echo "$content" > file
|
|
}
|
|
|
|
run_test() {
|
|
file_url=$(curl -s -F "oneshot=@file" localhost:8000)
|
|
test "$content" = $(curl -s "$file_url")
|
|
test "$content" = "$(cat upload/oneshot/file.txt.*)"
|
|
|
|
result="$(curl -s $file_url)"
|
|
test "file is not found or expired :(" = "$result"
|
|
}
|
|
|
|
teardown() {
|
|
rm file
|
|
rm -r upload
|
|
}
|