Major Refactor (#2)

* Major reworks

* More refactoring

* Refactor feature complete!

* Comments

* Add versioning
This commit is contained in:
2022-10-28 23:08:17 -04:00
committed by GitHub
parent 49aa4fdedb
commit 696ab7201c
18 changed files with 403 additions and 186 deletions

27
core/event_test.go Normal file
View File

@@ -0,0 +1,27 @@
package core
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestGetChannelName(t *testing.T) {
assert := assert.New(t)
event := Event{
Name: "Hello World",
Location: "1234 Place Rd, Ann Arbor, MI 00000",
DateTime: time.Date(2022, time.January, 5, 0, 0, 0, 0, time.UTC),
}
assert.Equal("jan-5-ann-arbor-hello-world", event.Channel().Name)
event = Event{
Name: "Hello World",
Location: "Michigan Theater, Ann Arbor",
DateTime: time.Date(2022, time.January, 5, 0, 0, 0, 0, time.UTC),
}
assert.Equal("jan-5-hello-world", event.Channel().Name)
}