9e711957c0
Outsiders reading this module should not see private sibling names (tradey), unfinished rewire notes, or /fast/projects lab paths. Keep the library self-contained in README, design, plan, and test fixtures/identity strings.
15 lines
352 B
Go
15 lines
352 B
Go
package auth
|
|
|
|
import "testing"
|
|
|
|
func TestOAuthIdentity(t *testing.T) {
|
|
gotN, gotV := oauthIdentity(Config{Name: "example-app", Version: "0.9"})
|
|
if gotN != "example-app" || gotV != "0.9" {
|
|
t.Fatalf("%s %s", gotN, gotV)
|
|
}
|
|
gotN, gotV = oauthIdentity(Config{})
|
|
if gotN != DefaultName || gotV != DefaultVersion {
|
|
t.Fatalf("%s %s", gotN, gotV)
|
|
}
|
|
}
|