hx_url_method_test.go 401 B

123456789101112131415161718192021
  1. package hx_url_method
  2. import (
  3. "testing"
  4. "gitp78su.ipnodns.ru/svi/kern/v4/lev0/defs"
  5. )
  6. func TestHxUrlMethod(t *testing.T) {
  7. swap := NewHxUrlMethod()
  8. if swap == nil {
  9. t.Fatalf("swap==nil")
  10. }
  11. if method := swap.Method(); method.Get() != "hx-post" {
  12. t.Fatalf("tag not empty")
  13. }
  14. swap.Set(defs.Txt("hx-get"))
  15. if method := swap.Method(); method.Get() != "hx-get" {
  16. t.Fatalf("tag bad")
  17. }
  18. }