Skip to content

Commit

Permalink
go-gorp#44 - add assertions on post-insert bound Id field
Browse files Browse the repository at this point in the history
  • Loading branch information
coopernurse committed May 26, 2013
1 parent 22e93ed commit d4c4bce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gorp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ func TestUIntPrimaryKey(t *testing.T) {
if err != nil {
t.Error(err)
}
if p1.Id != 1 {
t.Errorf("%d != 1", p1.Id)
}
if p2.Id != 1 {
t.Errorf("%d != 1", p2.Id)
}
if p3.Id != 1 {
t.Errorf("%d != 1", p3.Id)
}
}

func TestPersistentUser(t *testing.T) {
Expand Down

0 comments on commit d4c4bce

Please sign in to comment.