diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-05 21:42:46 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-05 21:42:46 -0600 |
commit | d8b12cf17a43e700d841402f712efa8666e6137f (patch) | |
tree | 919379d925d4ed15ee176446873d1bcc756c37d2 /srv/src/post/post_test.go | |
parent | eed10ce514f28e4acf772f76c92ca05eebec105f (diff) |
Begin work on post package
Diffstat (limited to 'srv/src/post/post_test.go')
-rw-r--r-- | srv/src/post/post_test.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/srv/src/post/post_test.go b/srv/src/post/post_test.go new file mode 100644 index 0000000..47c9ae8 --- /dev/null +++ b/srv/src/post/post_test.go @@ -0,0 +1,32 @@ +package post + +import ( + "strconv" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNewID(t *testing.T) { + + tests := [][2]string{ + { + "Why Do We Have WiFi Passwords?", + "why-do-we-have-wifi-passwords", + }, + { + "Ginger: A Small VM Update", + "ginger-a-small-vm-update", + }, + { + "Something-Weird.... woah!", + "somethingweird-woah", + }, + } + + for i, test := range tests { + t.Run(strconv.Itoa(i), func(t *testing.T) { + assert.Equal(t, test[1], NewID(test[0])) + }) + } +} |