1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-07-05 00:49:25 +02:00
Files
authboss/storer_test.go

27 lines
498 B
Go
Raw Normal View History

package authboss
import "testing"
2015-01-18 14:35:44 -08:00
func TestCasingStyleConversions(t *testing.T) {
t.Parallel()
tests := []struct {
In string
Out string
}{
{"SomethingInCamel", "something_in_camel"},
{"Oauth2Anything", "oauth2_anything"},
2015-01-18 14:35:44 -08:00
}
for i, test := range tests {
out := camelToUnder(test.In)
if out != test.Out {
t.Errorf("%d) Expected %q got %q", i, test.Out, out)
}
out = underToCamel(out)
if out != test.In {
2015-03-16 14:42:45 -07:00
t.Errorf("%d), Expected %q got %q", i, test.In, out)
}
2015-01-18 14:35:44 -08:00
}
}