diff options
Diffstat (limited to 'internal/postgres/insert_module_test.go')
| -rw-r--r-- | internal/postgres/insert_module_test.go | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/internal/postgres/insert_module_test.go b/internal/postgres/insert_module_test.go index 3c44d872..d415dcd5 100644 --- a/internal/postgres/insert_module_test.go +++ b/internal/postgres/insert_module_test.go @@ -77,6 +77,14 @@ func TestInsertModule(t *testing.T) { }(), goMod: "module " + sample.ModulePath + " // Deprecated: use v2", }, + { + name: "zero commit time", + module: func() *internal.Module { + v := sample.DefaultModule() + v.CommitTime = time.Time{} + return v + }(), + }, } { t.Run(test.name, func(t *testing.T) { testDB, release := acquire(t) @@ -259,17 +267,6 @@ func TestInsertModuleErrors(t *testing.T) { wantModulePath: sample.ModulePath, wantWriteErr: derrors.DBModuleInsertInvalid, }, - { - name: "empty commit time", - module: func() *internal.Module { - v := sample.DefaultModule() - v.CommitTime = time.Time{} - return v - }(), - wantVersion: sample.VersionString, - wantModulePath: sample.ModulePath, - wantWriteErr: derrors.BadModule, - }, } for _, test := range testCases { |
