Skip to content

Commit

Permalink
returning json
Browse files Browse the repository at this point in the history
  • Loading branch information
ericminio committed Apr 25, 2024
1 parent 0b7eda8 commit 578bc83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions stub-json/about/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ function test_json_header {

assertequals "$type" "Content-Type: application/json"
}

function test_json_content {
nginx_reload_configuration
body=$(curl http://localhost:8080/json)

assertequals "$body" "{\"alive\":true}"
}
2 changes: 1 addition & 1 deletion stub-json/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ server {

location /json {
default_type application/json;
return 200 'pong';
return 200 '{"alive":true}';
}

}

0 comments on commit 578bc83

Please sign in to comment.