diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-11-18 12:48:45 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-11-18 12:48:45 -0500 |
commit | e408d615c02ae3c863df3c7dc13d1b813c22fd28 (patch) | |
tree | a1c607b7721831c71aadbf89f018ed7b11a0e426 /store/sql_oauth_store_test.go | |
parent | 9660adb00775aba822d2d684d215c55679a456c6 (diff) | |
parent | c115191d6b5abdefda856c063e3f9048dc82f830 (diff) | |
download | chat-e408d615c02ae3c863df3c7dc13d1b813c22fd28.tar.gz chat-e408d615c02ae3c863df3c7dc13d1b813c22fd28.tar.bz2 chat-e408d615c02ae3c863df3c7dc13d1b813c22fd28.zip |
Merge pull request #1448 from mattermost/PLT-975
PLT-975 adding delete to command line tool
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..c3f6ea7ac 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 TestOAuthStoreRemoveAuthDataByUser(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().PermanentDeleteAuthDataByUser(a1.UserId)).Err; err != nil { + t.Fatal(err) + } +} |