summaryrefslogtreecommitdiffstats
path: root/store/sql_session_store_test.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-07-06 11:24:06 -0800
committerCorey Hulen <corey@hulen.com>2015-07-06 11:24:06 -0800
commit3dec509899f60ca0d2eadfcc192ccc49969852ef (patch)
treea86552979d6fab4dbe336171ade9d3e69b64fff0 /store/sql_session_store_test.go
parent10b625ba1740c6177cfe5c06484f4a14867523bd (diff)
parent34fb817a4a4cd2761ba35a2c94f9d0eb79d06244 (diff)
downloadchat-3dec509899f60ca0d2eadfcc192ccc49969852ef.tar.gz
chat-3dec509899f60ca0d2eadfcc192ccc49969852ef.tar.bz2
chat-3dec509899f60ca0d2eadfcc192ccc49969852ef.zip
Merge pull request #131 from mattermost/mm-1391
Fixes mm-1391 adding travis CI
Diffstat (limited to 'store/sql_session_store_test.go')
-rw-r--r--store/sql_session_store_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/store/sql_session_store_test.go b/store/sql_session_store_test.go
index edb1d4c14..581aff971 100644
--- a/store/sql_session_store_test.go
+++ b/store/sql_session_store_test.go
@@ -26,18 +26,18 @@ func TestSessionGet(t *testing.T) {
s1 := model.Session{}
s1.UserId = model.NewId()
s1.TeamId = model.NewId()
- <-store.Session().Save(&s1)
+ Must(store.Session().Save(&s1))
s2 := model.Session{}
s2.UserId = s1.UserId
s2.TeamId = s1.TeamId
- <-store.Session().Save(&s2)
+ Must(store.Session().Save(&s2))
s3 := model.Session{}
s3.UserId = s1.UserId
s3.TeamId = s1.TeamId
s3.ExpiresAt = 1
- <-store.Session().Save(&s3)
+ Must(store.Session().Save(&s3))
if rs1 := (<-store.Session().Get(s1.Id)); rs1.Err != nil {
t.Fatal(rs1.Err)
@@ -63,7 +63,7 @@ func TestSessionRemove(t *testing.T) {
s1 := model.Session{}
s1.UserId = model.NewId()
s1.TeamId = model.NewId()
- <-store.Session().Save(&s1)
+ Must(store.Session().Save(&s1))
if rs1 := (<-store.Session().Get(s1.Id)); rs1.Err != nil {
t.Fatal(rs1.Err)
@@ -73,7 +73,7 @@ func TestSessionRemove(t *testing.T) {
}
}
- <-store.Session().Remove(s1.Id)
+ Must(store.Session().Remove(s1.Id))
if rs2 := (<-store.Session().Get(s1.Id)); rs2.Err == nil {
t.Fatal("should have been removed")
@@ -86,7 +86,7 @@ func TestSessionRemoveAlt(t *testing.T) {
s1 := model.Session{}
s1.UserId = model.NewId()
s1.TeamId = model.NewId()
- <-store.Session().Save(&s1)
+ Must(store.Session().Save(&s1))
if rs1 := (<-store.Session().Get(s1.Id)); rs1.Err != nil {
t.Fatal(rs1.Err)
@@ -96,7 +96,7 @@ func TestSessionRemoveAlt(t *testing.T) {
}
}
- <-store.Session().Remove(s1.AltId)
+ Must(store.Session().Remove(s1.AltId))
if rs2 := (<-store.Session().Get(s1.Id)); rs2.Err == nil {
t.Fatal("should have been removed")
@@ -117,7 +117,7 @@ func TestSessionStoreUpdateLastActivityAt(t *testing.T) {
s1 := model.Session{}
s1.UserId = model.NewId()
s1.TeamId = model.NewId()
- <-store.Session().Save(&s1)
+ Must(store.Session().Save(&s1))
if err := (<-store.Session().UpdateLastActivityAt(s1.Id, 1234567890)).Err; err != nil {
t.Fatal(err)