diff options
author | =Corey Hulen <corey@hulen.com> | 2015-11-15 18:18:02 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-11-16 11:34:29 -0800 |
commit | 03c6dcbd865e2af2db5db150189504bfa493ae2e (patch) | |
tree | 360d2ece83de79d3df338d581216e4282b420209 /store/sql_oauth_store_test.go | |
parent | 48d2f86b90b3e0b02cb28f3e8b6e4d454f9cb869 (diff) | |
download | chat-03c6dcbd865e2af2db5db150189504bfa493ae2e.tar.gz chat-03c6dcbd865e2af2db5db150189504bfa493ae2e.tar.bz2 chat-03c6dcbd865e2af2db5db150189504bfa493ae2e.zip |
PLT-975 adding perm deletes
Diffstat (limited to 'store/sql_oauth_store_test.go')
-rw-r--r-- | store/sql_oauth_store_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/store/sql_oauth_store_test.go b/store/sql_oauth_store_test.go index 3f05f1c92..2a9aad1b3 100644 --- a/store/sql_oauth_store_test.go +++ b/store/sql_oauth_store_test.go @@ -180,3 +180,17 @@ func TestOAuthStoreRemoveAuthData(t *testing.T) { t.Fatal("should have errored - auth code removed") } } + +func TestOAuthStoreRemoveAuthDataByUserId(t *testing.T) { + Setup() + + a1 := model.AuthData{} + a1.ClientId = model.NewId() + a1.UserId = model.NewId() + a1.Code = model.NewId() + Must(store.OAuth().SaveAuthData(&a1)) + + if err := (<-store.OAuth().RemoveAuthDataByUserId(a1.UserId)).Err; err != nil { + t.Fatal(err) + } +} |