Skip to content

Commit

Permalink
New test file for cric.go
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Aug 24, 2024
1 parent 54368f8 commit 36f7fac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cric_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package cmsauth

import (
"testing"

"github.com/stretchr/testify/assert"
)

// TestGetSortedDN function
func TestGetSortedDN(t *testing.T) {
dn := "/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=user/CN=123/CN=First Last"
expect := "/CN=123/CN=First Last/CN=user/DC=cern/DC=ch/OU=Organic Units/OU=Users"
sortedDN := GetSortedDN(dn)
assert.Equal(t, sortedDN, expect)
}

0 comments on commit 36f7fac

Please sign in to comment.