Permalink
Browse files

Upgrade go-sqlite to discard deprecation errors on macOS

  • Loading branch information...
mraerino committed Nov 13, 2018
1 parent 2cf516d commit d0068f6b9c57a92b4f08baf3fda3f2992388d495
Showing with 7 additions and 8 deletions.
  1. +3 −4 api/user_test.go
  2. +1 −1 go.mod
  3. +2 −2 go.sum
  4. +1 −1 models/user.go
@@ -6,9 +6,7 @@ import (
"fmt"
"net/http"
"testing"
"time"

"github.com/go-sql-driver/mysql"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@@ -53,8 +51,9 @@ func TestUsersList(t *testing.T) {
case test.Data.testUser.ID:
assert.Equal(t, test.Data.testUser.Email, u.Email)
assert.Equal(t, "Bruce Wayne", u.Name)
expectedTime := mysql.NullTime{test.Data.secondOrder.CreatedAt.In(time.UTC), true}
assert.EqualValues(t, expectedTime, *u.LastOrderAt)
expectedTime := test.Data.secondOrder.CreatedAt.UTC()
assert.True(t, u.LastOrderAt.Valid)
assert.Equal(t, expectedTime, u.LastOrderAt.Time.UTC())
default:
assert.Fail(t, "unexpected user %v\n", u)
}
2 go.mod

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
4 go.sum

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -46,7 +46,7 @@ func (t *HackyNullTime) Scan(value interface{}) (err error) {
}

// fallback to sqlite time format
timeFormat := "2006-01-02 15:04:05.999999999"
timeFormat := "2006-01-02 15:04:05.999999-07:00"

switch v := value.(type) {
case []byte:

0 comments on commit d0068f6

Please sign in to comment.