From d4c4bcec62e7286324e908eb553e495ff84e87b4 Mon Sep 17 00:00:00 2001 From: James Cooper Date: Sun, 26 May 2013 09:35:19 -0700 Subject: [PATCH] #44 - add assertions on post-insert bound Id field --- gorp_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gorp_test.go b/gorp_test.go index 0a21ebb5..1e0883ca 100644 --- a/gorp_test.go +++ b/gorp_test.go @@ -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) {