Skip to content

Commit

Permalink
start of issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Mar 8, 2018
1 parent 5031695 commit fe5a1f3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions http_download_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
. ./is_command.sh
. ./http_download.sh
. ./assert.sh

# test normal 200
test1() {
http_download /dev/null https://raw.githubusercontent.com/client9/shlib/master/README.md
assertEquals "$?" "0" "return != 0 on valid URL"
}

# test 404, missing
test2() {
http_download /dev/null https://raw.githubusercontent.com/client9/shlib/master/does_not_exist
assertNotEquals "$?" "0" "expected return to be non-zero on 404"
}

test1
test2

0 comments on commit fe5a1f3

Please sign in to comment.