summaryrefslogtreecommitdiffstats
path: root/test-directories.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-02-23 16:20:31 +0000
committerMichael Allen <michael@michaelallen.io>2015-02-23 16:20:31 +0000
commit85867b8e5be3bed7b79e7711a3d1bed2327f1188 (patch)
treeae291af8307992794f3d29358321691edad2a9b6 /test-directories.sh
parente91f893e79091369f89e0a38a523735744de5cce (diff)
downloadgit-sonar-85867b8e5be3bed7b79e7711a3d1bed2327f1188.tar.gz
git-sonar-85867b8e5be3bed7b79e7711a3d1bed2327f1188.zip
default timestamp to 0 if no recorded timestamp
Diffstat (limited to 'test-directories.sh')
-rwxr-xr-xtest-directories.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test-directories.sh b/test-directories.sh
index adf8ea8..1520ffb 100755
--- a/test-directories.sh
+++ b/test-directories.sh
@@ -12,7 +12,7 @@ cd_to_tmp() {
rm_tmp() {
cd $scriptDir
- rm -r "$tmpfile"
+ rm -rf /tmp/git-prompt-tests*
}
test_git_root_in_repo() {
@@ -73,4 +73,13 @@ test_not_time_to_update_when_just_recorded() {
assertFalse time_to_update
}
+test_time_to_update_when_no_timestamp() {
+ cd_to_tmp
+ git init --quiet
+
+ assertTrue time_to_update
+
+ rm_tmp
+}
+
. ./shunit/shunit2