Skip to content

Commit

Permalink
tests helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberdelia committed Mar 13, 2014
1 parent 780becf commit 4e98a1e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions schema/helpers_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package schema

import "testing"

var initialCapTests = []struct {
Ident string
Depuncted string
}{
{
Ident: "provider_id",
Depuncted: "ProviderID",
},
{
Ident: "app-identity",
Depuncted: "AppIdentity",
},
{
Ident: "uuid",
Depuncted: "UUID",
},
{
Ident: "oauth-client",
Depuncted: "OAuthClient",
},
{
Ident: "Dyno all",
Depuncted: "DynoAll",
},
}

func TestInitialCap(t *testing.T) {
for i, ict := range initialCapTests {
depuncted := depunct(ict.Ident, true)
if depuncted != ict.Depuncted {
t.Errorf("%d: wants %v, got %v", i, ict.Depuncted, depuncted)
}
}
}

0 comments on commit 4e98a1e

Please sign in to comment.