Skip to content

Commit 0892768

Browse files
committed
Added Test for creating new directory
1 parent d33a442 commit 0892768

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

test/test-base.bats

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!./test/libs/bats/bin/bats
2+
3+
load 'libs/bats-support/load'
4+
load 'libs/bats-assert/load'
5+
load 'helpers'
6+
7+
setup() {
8+
setupNotesEnv
9+
}
10+
11+
teardown() {
12+
teardownNotesEnv
13+
}
14+
15+
export EDITOR=touch
16+
notes="./notes"
17+
18+
@test "NOTES_DIRECTORY should be created if it doesn't exist" {
19+
rm -r $NOTES_DIRECTORY
20+
run $notes new test
21+
assert_success
22+
assert_exists "$NOTES_DIRECTORY/test.md"
23+
}

test/test-config.bats

100644100755
File mode changed.

test/test-ls.bats

100644100755
File mode changed.

0 commit comments

Comments
 (0)