/user/store/db/postgres/store_feedback_integration_test.go
Go | 31 lines | 22 code | 8 blank | 1 comment | 0 complexity | 3db4850185ef2139526e42b14706cd3a MD5 | raw file
- // +build integration
- package user_store_postgres_test
- import (
- "bitbucket.org/epicglue/api/helpers"
- "bitbucket.org/epicglue/api/model"
- "bitbucket.org/epicglue/api/user/store/db/postgres"
- "github.com/stretchr/testify/assert"
- "testing"
- )
- func TestFeedbackValidation(t *testing.T) {
- userStore := user_store_postgres.NewUserStorePostgres()
- assert.NotNil(t, userStore.SaveFeedbackForUser(nil, ""))
- assert.NotNil(t, userStore.SaveFeedbackForUser(&model.User{
- Id: 1,
- }, ""))
- }
- func TestNewFeedback(t *testing.T) {
- userStore := user_store_postgres.NewUserStorePostgres()
- feedbackContent := helpers.RandomString(8)
- assert.Nil(t, userStore.SaveFeedbackForUser(&model.User{
- Id: 1,
- }, feedbackContent))
- }