about_test.go 346 B

123456789101112131415161718192021
  1. package api
  2. import (
  3. "testing"
  4. "devt.de/krotik/rufs/config"
  5. )
  6. func TestAboutEndpoint(t *testing.T) {
  7. st, _, body, _ := sendTestRequest(testQueryURL+EndpointAbout, "GET", nil)
  8. if st != "200 OK" || body != `
  9. {
  10. "product": "RUFS",
  11. "version": "`[1:]+config.ProductVersion+`"
  12. }` {
  13. t.Error("Unexpected response:", st, body)
  14. return
  15. }
  16. }