package hx_url_patch

import (
	"testing"
)

func TestHxUrlPatch(t *testing.T) {
	swap := NewHxUrlPatch("/wui/form/123")
	if swap == nil {
		t.Fatalf("swap==nil")
	}
	if patch := swap.Get(); patch != "/wui/form/123" {
		t.Fatalf("patch bad")
	}
	swap.Set("/wui/click/abc")
	if patch := swap.Get(); patch != "/wui/click/abc" {
		t.Fatalf("patch bad")
	}
}
