summaryrefslogtreecommitdiffstats
path: root/store/sql_session_store_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_session_store_test.go')
-rw-r--r--store/sql_session_store_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/store/sql_session_store_test.go b/store/sql_session_store_test.go
index 24526a4a9..aa088b377 100644
--- a/store/sql_session_store_test.go
+++ b/store/sql_session_store_test.go
@@ -197,6 +197,26 @@ func TestSessionUpdateDeviceId(t *testing.T) {
}
}
+func TestSessionUpdateDeviceId2(t *testing.T) {
+ Setup()
+
+ s1 := model.Session{}
+ s1.UserId = model.NewId()
+ Must(store.Session().Save(&s1))
+
+ if rs1 := (<-store.Session().UpdateDeviceId(s1.Id, model.PUSH_NOTIFY_APPLE_REACT_NATIVE+":1234567890", s1.ExpiresAt)); rs1.Err != nil {
+ t.Fatal(rs1.Err)
+ }
+
+ s2 := model.Session{}
+ s2.UserId = model.NewId()
+ Must(store.Session().Save(&s2))
+
+ if rs2 := (<-store.Session().UpdateDeviceId(s2.Id, model.PUSH_NOTIFY_APPLE_REACT_NATIVE+":1234567890", s1.ExpiresAt)); rs2.Err != nil {
+ t.Fatal(rs2.Err)
+ }
+}
+
func TestSessionStoreUpdateLastActivityAt(t *testing.T) {
Setup()