diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-01-27 09:22:27 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-01-27 09:22:27 -0500 |
commit | f0e6e7de93715f61ef3055efe29ecc35bfefb35d (patch) | |
tree | be81061f6169401a0cae6507d4164da969f4e605 /store/sql_session_store_test.go | |
parent | e5ed90821e6bb25c27e5627cf289df41cbcb1793 (diff) | |
parent | 6fd0f651b94e594dddb00800bf295af7ff42934e (diff) | |
download | chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.tar.gz chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.tar.bz2 chat-f0e6e7de93715f61ef3055efe29ecc35bfefb35d.zip |
Merge pull request #1993 from mattermost/PLT-1586
PLT-1586 adding LDAP/OAuth to iOS
Diffstat (limited to 'store/sql_session_store_test.go')
-rw-r--r-- | store/sql_session_store_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/store/sql_session_store_test.go b/store/sql_session_store_test.go index cec8e93b0..34d3128a6 100644 --- a/store/sql_session_store_test.go +++ b/store/sql_session_store_test.go @@ -157,6 +157,28 @@ func TestSessionRemoveToken(t *testing.T) { } } +func TestSessionUpdateDeviceId(t *testing.T) { + Setup() + + s1 := model.Session{} + s1.UserId = model.NewId() + s1.TeamId = model.NewId() + Must(store.Session().Save(&s1)) + + if rs1 := (<-store.Session().UpdateDeviceId(s1.Id, model.PUSH_NOTIFY_APPLE+":1234567890")); rs1.Err != nil { + t.Fatal(rs1.Err) + } + + s2 := model.Session{} + s2.UserId = model.NewId() + s2.TeamId = model.NewId() + Must(store.Session().Save(&s2)) + + if rs2 := (<-store.Session().UpdateDeviceId(s2.Id, model.PUSH_NOTIFY_APPLE+":1234567890")); rs2.Err != nil { + t.Fatal(rs2.Err) + } +} + func TestSessionStoreUpdateLastActivityAt(t *testing.T) { Setup() |