Skip to content

Commit

Permalink
Merge pull request #423 from traPtitech/fix/random-arg
Browse files Browse the repository at this point in the history
🐛 fix random.AlphaNumeric arg
  • Loading branch information
ras0q authored Jun 24, 2023
2 parents 01e2de3 + 6e71a8c commit ffb7adb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions infra/db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ func setupRepoWithUserGroup(t *testing.T, repo string) (*GormRepository, *assert
func setupRepoWithUserRoom(t *testing.T, repo string) (*GormRepository, *assert.Assertions, *require.Assertions, *User, *Room) {
t.Helper()
r, assert, require := setupRepo(t, repo)
room, user := mustMakeRoom(t, r, "here_"+random.AlphaNumeric(10))
room, user := mustMakeRoom(t, r, "here_"+random.AlphaNumeric(10, false))
return r, assert, require, user, room
}

func setupRepoWithUserGroupRoomEvent(t *testing.T, repo string) (*GormRepository, *assert.Assertions, *require.Assertions, *User, *Group, *Room, *Event) {
t.Helper()
r, assert, require := setupRepo(t, repo)

event, group, room, user := mustMakeEvent(t, r, "event-"+random.AlphaNumeric(10))
event, group, room, user := mustMakeEvent(t, r, "event-"+random.AlphaNumeric(10, false))
return r, assert, require, user, group, room, event
}

Expand Down
2 changes: 1 addition & 1 deletion infra/db/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func Test_createEvent(t *testing.T) {
return WriteEventParams{
CreatedBy: user.ID,
WriteEventParams: domain.WriteEventParams{
Name: "event-" + random.AlphaNumeric(10),
Name: "event-" + random.AlphaNumeric(10, false),
GroupID: mustNewUUIDV4(t),
RoomID: room.ID,
TimeStart: time.Now(),
Expand Down
6 changes: 3 additions & 3 deletions infra/db/room_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/go-sql-driver/mysql"
"github.com/gofrs/uuid"
"github.com/traPtitech/knoQ/domain"
"github.com/traPtitech/traQ/utils/random"
"github.com/traPtitech/knoQ/utils/random"
)

func Test_createRoom(t *testing.T) {
Expand All @@ -18,7 +18,7 @@ func Test_createRoom(t *testing.T) {
CreatedBy: user.ID,
Verified: false,
WriteRoomParams: domain.WriteRoomParams{
Place: "create room_" + random.AlphaNumeric(10),
Place: "create room_" + random.AlphaNumeric(10, false),
TimeStart: time.Now(),
TimeEnd: time.Now().Add(1 * time.Minute),
Admins: []uuid.UUID{user.ID},
Expand Down Expand Up @@ -58,7 +58,7 @@ func Test_updateRoom(t *testing.T) {
return UpdateRoomParams{
CreatedBy: user.ID,
WriteRoomParams: domain.WriteRoomParams{
Place: "update room_" + random.AlphaNumeric(10),
Place: "update room_" + random.AlphaNumeric(10, false),
TimeStart: time.Now(),
TimeEnd: time.Now().Add(1 * time.Minute),
Admins: []uuid.UUID{user.ID},
Expand Down

0 comments on commit ffb7adb

Please sign in to comment.