-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updated dbml, dependencies and testing
- Loading branch information
Showing
9 changed files
with
354 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,6 @@ swagger.yaml | |
# Log files | ||
logs/log.txt | ||
|
||
# Packages | ||
go.sum | ||
|
||
# air hot reload | ||
tmp | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package utils | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestConvertStringToByteSlice(t *testing.T) { | ||
testcases := []struct { | ||
s string | ||
b []byte | ||
}{ | ||
{ | ||
s: "", | ||
b: []byte(nil), | ||
}, | ||
{ | ||
s: "hello world", | ||
b: []byte("hello world"), | ||
}, | ||
} | ||
|
||
for i, testcase := range testcases { | ||
t.Run(fmt.Sprintf("Running test case %d", i), func(t *testing.T) { | ||
result := ConvertStringToByteSlice(testcase.s) | ||
assert.Equal(t, testcase.b, result) | ||
}) | ||
} | ||
} | ||
|
||
func TestNewStringPointer(t *testing.T) { | ||
assert.NotNil(t, NewStringPointer("hello")) | ||
assert.NotNil(t, NewStringPointer("")) | ||
} |