diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-25 11:00:53 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-25 11:00:53 -0600 |
| commit | 0053db0d265af313dd281db5cf1e73236cde30c6 (patch) | |
| tree | 2ec76a6d42fc903aaa1d0e135addd95d1fd945e4 /app/domain/user_test.go | |
| parent | 33981e04bebe39c16d3bbb3af84c8772b00102fd (diff) | |
refactor: move domain package into app
Diffstat (limited to 'app/domain/user_test.go')
| -rw-r--r-- | app/domain/user_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/domain/user_test.go b/app/domain/user_test.go new file mode 100644 index 0000000..1576d6d --- /dev/null +++ b/app/domain/user_test.go @@ -0,0 +1,24 @@ +package domain + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestUser(t *testing.T) { + t.Run("Sparkle", func(t *testing.T) { + t.Run("returns a new Sparkle", func(t *testing.T) { + tanuki := &User{Username: "tanuki"} + user := &User{} + + sparkle := user.Sparkle(tanuki.Username, "for helping me with my homework") + + require.NotNil(t, sparkle) + assert.Equal(t, tanuki.Username, sparkle.Sparklee) + assert.Equal(t, "for helping me with my homework", sparkle.Reason) + assert.Equal(t, user, sparkle.Author) + }) + }) +} |
