33 lines
813 B
Bash
Executable File
33 lines
813 B
Bash
Executable File
#!/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 ]
|
|
}
|