Skip to content

Commit

Permalink
fix error check sta8
Browse files Browse the repository at this point in the history
  • Loading branch information
shake551 committed Mar 8, 2023
1 parent 045223a commit f129bde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _test/sta8/sta8_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package sta8_test

import (
"context"
"errors"
"os"
"reflect"
"testing"
"time"

Expand Down Expand Up @@ -62,7 +62,7 @@ func TestStation8(t *testing.T) {
svc := service.NewTODOService(d)
got, err := svc.CreateTODO(context.Background(), tc.Subject, tc.Description)
if err != nil {
if reflect.TypeOf(err) != reflect.TypeOf(sqlite3Err) {
if !errors.As(err, sqlite3Err) {
t.Errorf("期待していないエラーの Type です, got = %t, want = %+v", err, sqlite3Err)
}
if err.(sqlite3.Error).Code != sqlite3.ErrConstraint {
Expand Down

0 comments on commit f129bde

Please sign in to comment.