From 13701c4f668eba27956a8ac554a1fe272245d210 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Wed, 28 Oct 2020 16:59:04 +0100 Subject: Add attribute helpers (#35) Also refactor tests to be table-driven, for readability.--- attr/attributes_test.go | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'attr/attributes_test.go') diff --git a/attr/attributes_test.go b/attr/attributes_test.go index c2ddff0..efb7044 100644 --- a/attr/attributes_test.go +++ b/attr/attributes_test.go @@ -8,18 +8,6 @@ import ( "github.com/maragudk/gomponents/attr" ) -func TestID(t *testing.T) { - t.Run("given a value, returns id=value", func(t *testing.T) { - assert.Equal(t, ` id="hat"`, attr.ID("hat")) - }) -} - -func TestClass(t *testing.T) { - t.Run("given a value, returns class=value", func(t *testing.T) { - assert.Equal(t, ` class="hat"`, attr.Class("hat")) - }) -} - func TestClasses(t *testing.T) { t.Run("given a map, returns sorted keys from the map with value true", func(t *testing.T) { assert.Equal(t, ` class="boheme-hat hat partyhat"`, attr.Classes{ -- cgit 1.4.1