package viral

import "testing"

func TestIsAccountTag(t *testing.T) {
	if !IsAccountTag("@creator") {
		t.Fatal("expected account tag")
	}
	if IsAccountTag("keyword") {
		t.Fatal("expected keyword tag")
	}
}

func TestDiscoverKeywordFromTag(t *testing.T) {
	if got := DiscoverKeywordFromTag("@foo_bar"); got != "foo_bar" {
		t.Fatalf("got %q", got)
	}
	if got := DiscoverKeywordFromTag("熱詞"); got != "熱詞" {
		t.Fatalf("got %q", got)
	}
}
