final touches for beta skymoney (at least i think)
This commit is contained in:
19
api/test-simple.sh
Normal file
19
api/test-simple.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "<22><><EFBFBD> Logging in..."
|
||||
curl -s -c cookies.txt -X POST http://localhost:8080/api/auth/login \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"email":"test@skymoney.com","password":"password123"}' > /dev/null
|
||||
|
||||
echo "<22><><EFBFBD> Plans BEFORE:"
|
||||
curl -s -b cookies.txt http://localhost:8080/api/fixed-plans
|
||||
|
||||
echo -e "\n\n<><6E><EFBFBD> Posting $1000 income..."
|
||||
curl -s -b cookies.txt -X POST http://localhost:8080/api/income \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"amountCents\": 100000, \"postedAt\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\", \"note\": \"Test\"}"
|
||||
|
||||
echo -e "\n\n<><6E><EFBFBD> Plans AFTER:"
|
||||
curl -s -b cookies.txt http://localhost:8080/api/fixed-plans
|
||||
|
||||
rm -f cookies.txt
|
||||
Reference in New Issue
Block a user