Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
go sqlgen/integration_test: Add a test that covers Count functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
btuan committed Mar 29, 2019
1 parent 922395e commit 8416f8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sqlgen/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ func TestIntegrationBasic(t *testing.T) {
Mood: &mood,
},
}, users)

var numBobs int64
err = db.Count(context.Background(), &User{}, &numBobs, Filter{"name": "Bob"})
assert.NoError(t, err)
assert.Equal(t, int64(1), numBobs)
}

// TestContextCancelBeforeRowsScan demonstrates we don't
Expand Down

0 comments on commit 8416f8c

Please sign in to comment.