Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

500 B
Raw Blame
package handlers

import "testing"

func TestRemoteFollowTemplateIgnoresNonStringTemplate(t *testing.T) {
	links := []map[string]interface{}{
		{
			"rel":      "http://ostatus.org/schema/1.0/subscribe",
			"template": 42,
		},
		{
			"rel":      "http://ostatus.org/schema/1.0/subscribe",
			"template": "https://remote.example/follow?uri={uri}",
		},
	}

	if got := remoteFollowTemplate(links); got != "https://remote.example/follow?uri={uri}" {
		t.Fatalf("remoteFollowTemplate() = %q", got)
	}
}