1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-30 09:06:45 +02:00
authboss/storer_test.go

27 lines
498 B
Go
Raw Normal View History

package authboss
import "testing"
2015-01-19 00:35:44 +02:00
func TestCasingStyleConversions(t *testing.T) {
t.Parallel()
tests := []struct {
In string
Out string
}{
{"SomethingInCamel", "something_in_camel"},
{"Oauth2Anything", "oauth2_anything"},
2015-01-19 00:35:44 +02: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 23:42:45 +02:00
t.Errorf("%d), Expected %q got %q", i, test.In, out)
}
2015-01-19 00:35:44 +02:00
}
}