-
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.
Signed-off-by: Masudur Rahman <[email protected]>
- Loading branch information
1 parent
f04ecee
commit 3d403cf
Showing
9 changed files
with
58 additions
and
15 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
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 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 |
---|---|---|
|
@@ -59,7 +59,7 @@ func TestPostgres_FindOne(t *testing.T) { | |
}() | ||
|
||
user := TestUser{} | ||
db = db.Table("test_user") | ||
//db = db.Table("test_user") | ||
|
||
t.Run("find user by id", func(t *testing.T) { | ||
has, err := db.ID(1).FindOne(&user) | ||
|
@@ -70,7 +70,7 @@ func TestPostgres_FindOne(t *testing.T) { | |
t.Run("find user by filter", func(t *testing.T) { | ||
has, err := db.Where("email=?", "[email protected]").FindOne(&user, TestUser{Name: "test"}) | ||
assert.Nil(t, err) | ||
assert.True(t, has) | ||
assert.False(t, has) | ||
}) | ||
} | ||
|
||
|
@@ -79,7 +79,7 @@ func TestPostgres_FindMany(t *testing.T) { | |
defer closer() | ||
|
||
var users []TestUser | ||
db = db.Table("test_user") | ||
//db = db.Table("test_user") | ||
|
||
t.Run("find all", func(t *testing.T) { | ||
err := db.FindMany(&users) | ||
|
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 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
Binary file not shown.