2022-10-26 23:12:29 +02:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
@test "Create user" {
|
|
|
|
echo "users" > content/users/create_test.create
|
|
|
|
|
|
|
|
[ -e content/users/create_test.create ]
|
|
|
|
|
|
|
|
bin/ac_route.sh "$(pwd)/content/users" create_test.create
|
|
|
|
|
|
|
|
[ ! -e content/users/create_test.create ]
|
|
|
|
[ -e content/users/create_test/_index.md ]
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Update property" {
|
|
|
|
echo "title: Simple edit" > content/users/create_test/_index.prop
|
|
|
|
|
|
|
|
bin/ac_route.sh "$(pwd)/content/users/create_test" _index.prop
|
|
|
|
|
|
|
|
grep -o "^title: Simple edit" content/users/create_test/_index.md
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Delete user" {
|
|
|
|
echo "hop" > content/users/create_test.delete
|
|
|
|
|
|
|
|
[ -e content/users/create_test.delete ]
|
|
|
|
|
|
|
|
bin/ac_route.sh "$(pwd)/content/users" create_test.delete
|
|
|
|
|
|
|
|
[ ! -e content/users/create_test.delete ]
|
|
|
|
[ ! -e content/users/create_test/_index.md ]
|
|
|
|
[ ! -e content/users/create_test ]
|
2022-11-05 22:23:24 +01:00
|
|
|
}
|