hx_url_test.go 462 B

1234567891011121314151617181920212223
  1. package hx_url
  2. import (
  3. "testing"
  4. "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
  5. )
  6. func TestHxUrl(t *testing.T) {
  7. swap := NewHxUrl(lev0.LetTxt("/wui/click/abc"))
  8. if swap == nil {
  9. t.Fatalf("swap==nil")
  10. }
  11. if met := swap.Method(); met == nil {
  12. t.Fatalf("met==nil")
  13. }
  14. if patch := swap.Patch(); patch == nil {
  15. t.Fatalf("patch==nil")
  16. }
  17. if str := swap.String(); str != `hx-post="/wui/click/abc"` {
  18. t.Fatalf(`str(%v)!=(hx-post="/wui/click/abc")`, str)
  19. }
  20. }