mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-21 17:23:47 +00:00
test nonsense
This commit is contained in:
parent
d3b25bab59
commit
60b7d67550
1 changed files with 3 additions and 8 deletions
|
@ -67,16 +67,11 @@ func TestAPI(t *testing.T) {
|
|||
tester := Init(ts.URL)
|
||||
// test mode
|
||||
mode = "test"
|
||||
db, err, ok := db.InitDb(config.DB, mode)
|
||||
|
||||
if err != nil && !ok {
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
db, err, _ := db.InitDb(config.DB, mode)
|
||||
assert.Nil(t, err)
|
||||
|
||||
hashedPassword, err := bcrypt.GenerateFromPassword([]byte(tester.password), bcrypt.DefaultCost)
|
||||
if err != nil {
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
assert.Nil(t, err)
|
||||
|
||||
db.Create(&internal.User{Username: tester.username, HashedPassword: string(hashedPassword)})
|
||||
|
||||
|
|
Loading…
Reference in a new issue