summaryrefslogtreecommitdiffstats
path: root/store/sql_oauth_store_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_oauth_store_test.go')
-rw-r--r--store/sql_oauth_store_test.go14
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)
+ }
+}