From 1eadef135c406447c3db7bfc7aa4b94cbe71c7e8 Mon Sep 17 00:00:00 2001 From: echarp Date: Wed, 26 Oct 2022 23:38:40 +0200 Subject: [PATCH] Proper test users --- bin/_commands/choice_test.bats | 2 +- bin/_commands/content_test.bats | 2 +- bin/_commands/create_delete_test.bats | 8 -------- bin/_commands/default_actions_test.bats | 2 +- bin/_commands/prop_test.bats | 2 +- content/users/_index.md | 4 ++++ 6 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 content/users/_index.md diff --git a/bin/_commands/choice_test.bats b/bin/_commands/choice_test.bats index 49df7bc..cbae495 100755 --- a/bin/_commands/choice_test.bats +++ b/bin/_commands/choice_test.bats @@ -34,5 +34,5 @@ ac_choices: teardown() { rm -f content/test.md - rm -rf content/users + rm -rf content/users/test } diff --git a/bin/_commands/content_test.bats b/bin/_commands/content_test.bats index d590ce6..bf561f4 100755 --- a/bin/_commands/content_test.bats +++ b/bin/_commands/content_test.bats @@ -26,5 +26,5 @@ On multiple lines" > content/users/test/content_test.content } teardown() { - rm -rf content/users + rm -rf content/users/test } diff --git a/bin/_commands/create_delete_test.bats b/bin/_commands/create_delete_test.bats index ee7b28e..71f70d1 100755 --- a/bin/_commands/create_delete_test.bats +++ b/bin/_commands/create_delete_test.bats @@ -1,9 +1,5 @@ #!/usr/bin/env bats -setup() { - mkdir -p content/users/create_test -} - @test "Create user" { echo "users" > content/users/create_test.create @@ -34,7 +30,3 @@ setup() { [ ! -e content/users/create_test/_index.md ] [ ! -e content/users/create_test ] } - -teardown() { - rm -rf content/users -} diff --git a/bin/_commands/default_actions_test.bats b/bin/_commands/default_actions_test.bats index 7ad42de..5f2bb54 100755 --- a/bin/_commands/default_actions_test.bats +++ b/bin/_commands/default_actions_test.bats @@ -66,7 +66,7 @@ ac_delete: teardown() { rm -f content/test.md rm -rf content/pages/test - rm -rf content/users + rm -rf content/users/test rm -f content/simple_link_test.md rm -f content/to_create_test.md rm -f content/to_delete_test.md diff --git a/bin/_commands/prop_test.bats b/bin/_commands/prop_test.bats index c8e4de4..9ce2dc3 100755 --- a/bin/_commands/prop_test.bats +++ b/bin/_commands/prop_test.bats @@ -127,5 +127,5 @@ ac_choices: } teardown() { - rm -rf content/users + rm -rf content/users/test } diff --git a/content/users/_index.md b/content/users/_index.md new file mode 100644 index 0000000..42fef8f --- /dev/null +++ b/content/users/_index.md @@ -0,0 +1,4 @@ +--- +title: Utilisateurs +--- +