diff options
Diffstat (limited to 'model/authorize_test.go')
-rw-r--r-- | model/authorize_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/model/authorize_test.go b/model/authorize_test.go index cbb57d54c..3f43a4fc3 100644 --- a/model/authorize_test.go +++ b/model/authorize_test.go @@ -20,6 +20,17 @@ func TestAuthJson(t *testing.T) { if a1.Code != ra1.Code { t.Fatal("codes didn't match") } + + a2 := AuthorizeRequest{} + a2.ClientId = NewId() + a2.Scope = NewId() + + json = a2.ToJson() + ra2 := AuthorizeRequestFromJson(strings.NewReader(json)) + + if a2.ClientId != ra2.ClientId { + t.Fatal("client ids didn't match") + } } func TestAuthPreSave(t *testing.T) { |