Feat: add password for player
This commit is contained in:
		| @@ -6,8 +6,8 @@ import ( | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/jmoiron/sqlx" | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| 	_ "github.com/mattn/go-sqlite3" | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| ) | ||||
|  | ||||
| func setupPlayersTestDB(t *testing.T) (*sqlx.DB, func()) { | ||||
| @@ -19,6 +19,7 @@ func setupPlayersTestDB(t *testing.T) (*sqlx.DB, func()) { | ||||
| 		id INTEGER PRIMARY KEY AUTOINCREMENT, | ||||
| 		room_id TEXT, | ||||
| 		username TEXT, | ||||
| 		password TEXT NOT NULL DEFAULT '', | ||||
| 		team TEXT, | ||||
| 		role TEXT, | ||||
| 		is_bot BOOLEAN | ||||
| @@ -105,4 +106,5 @@ func TestPlayersRepo_DeletePlayer(t *testing.T) { | ||||
| 	err = db.Get(&count, "SELECT COUNT(*) FROM players WHERE room_id = ? AND username = ?", player.RoomID, player.Username) | ||||
| 	assert.NoError(t, err) | ||||
| 	assert.Equal(t, 0, count) | ||||
| } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder