Skip to content

Commit

Permalink
tests (saml): minor code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlambrt committed Sep 9, 2023
1 parent f457d6d commit 2a4f75e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions saml/sp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

func Test_NewServiceProvider(t *testing.T) {
t.Parallel()
r := require.New(t)
exampleURL := "http://test.me"

Expand Down Expand Up @@ -56,16 +57,17 @@ func Test_NewServiceProvider(t *testing.T) {
if c.err != "" {
r.Error(err)
r.ErrorContains(err, c.err)
} else {
r.NoError(err)
r.NotNil(got)
r.NotNil(got.Config())
return
}
r.NoError(err)
r.NotNil(got)
r.NotNil(got.Config())
})
}
}

func Test_ServiceProvider_FetchMetadata_ErrorCases(t *testing.T) {
t.Parallel()
r := require.New(t)

s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
Expand Down Expand Up @@ -117,6 +119,7 @@ func Test_ServiceProvider_FetchMetadata_ErrorCases(t *testing.T) {
}

func Test_ServiceProvider_CreateMetadata(t *testing.T) {
t.Parallel()
r := require.New(t)

entityID := "http://test.me/entity"
Expand Down Expand Up @@ -185,6 +188,7 @@ func Test_ServiceProvider_CreateMetadata(t *testing.T) {
}

func Test_CreateMetadata_Options(t *testing.T) {
t.Parallel()
r := require.New(t)

fakeURL := "http://fake.test.url"
Expand Down

0 comments on commit 2a4f75e

Please sign in to comment.