Skip to content

Commit

Permalink
test: fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Sep 11, 2023
1 parent 233c8df commit 0b8d345
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions persistence/sql/persister_nid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,6 @@ func (s *PersisterTestSuite) TestInvalidateAuthorizeCodeSession() {
t.Run(k, func(t *testing.T) {
cl := &client.Client{ID: uuidx.NewV4().String()}
require.NoError(t, r.Persister().CreateClient(s.t1, cl))
cl.ID = ""
require.NoError(t, r.Persister().CreateClient(s.t2, cl))
sig := uuid.Must(uuid.NewV4()).String()
fr := fosite.NewRequest()
Expand Down Expand Up @@ -1495,7 +1494,6 @@ func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithBackChannelLogo
c1 := &client.Client{ID: "client-1", BackChannelLogoutURI: "not-null"}
c2 := &client.Client{ID: "client-2", BackChannelLogoutURI: "not-null"}
require.NoError(t, r.Persister().CreateClient(s.t1, c1))
c1.ID = ""
require.NoError(t, r.Persister().CreateClient(s.t2, c1))
require.NoError(t, r.Persister().CreateClient(s.t2, c2))

Expand Down Expand Up @@ -1579,7 +1577,6 @@ func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithFrontChannelLog
c1 := &client.Client{ID: "client-1", FrontChannelLogoutURI: "not-null"}
c2 := &client.Client{ID: "client-2", FrontChannelLogoutURI: "not-null"}
require.NoError(t, r.Persister().CreateClient(s.t1, c1))
c1.ID = ""
require.NoError(t, r.Persister().CreateClient(s.t2, c1))
require.NoError(t, r.Persister().CreateClient(s.t2, c2))

Expand Down Expand Up @@ -1869,7 +1866,7 @@ func (s *PersisterTestSuite) TestUpdateClient() {
require.NoError(t, r.Persister().UpdateClient(s.t2, &u1))

actual := &client.Client{}
require.NoError(t, r.Persister().Connection(context.Background()).Find(actual, t1c1.ID))
require.NoError(t, r.Persister().Connection(context.Background()).Where("nid = ?", s.t1NID).Find(actual, t1c1.ID))
require.Equal(t, "original", actual.Name)
require.Equal(t, expectedHash, actual.Secret)

Expand Down

0 comments on commit 0b8d345

Please sign in to comment.