fmt
This commit is contained in:
parent
261136c2bc
commit
5db306bacc
1 changed files with 5 additions and 5 deletions
|
@ -1,8 +1,8 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTeamMember_Create(t *testing.T) {
|
||||
|
@ -23,7 +23,7 @@ func TestTeamMember_Create(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Check he's in there
|
||||
team := Team{ID:1}
|
||||
team := Team{ID: 1}
|
||||
err = team.ReadOne()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 3, len(team.Members))
|
||||
|
@ -39,12 +39,12 @@ func TestTeamMember_Create(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Delete the other one
|
||||
tm := TeamMember{TeamID:1, UserID:2}
|
||||
tm := TeamMember{TeamID: 1, UserID: 2}
|
||||
err = tm.Delete()
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Try deleting the last one
|
||||
tm = TeamMember{TeamID:1, UserID:1}
|
||||
tm = TeamMember{TeamID: 1, UserID: 1}
|
||||
err = tm.Delete()
|
||||
assert.Error(t, err)
|
||||
assert.True(t, IsErrCannotDeleteLastTeamMember(err))
|
||||
|
@ -56,7 +56,7 @@ func TestTeamMember_Create(t *testing.T) {
|
|||
assert.True(t, IsErrUserDoesNotExist(err))
|
||||
|
||||
// Try adding a user to a team which does not exist
|
||||
tm = TeamMember{TeamID:94824, UserID:1}
|
||||
tm = TeamMember{TeamID: 94824, UserID: 1}
|
||||
err = tm.Create(&doer)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, IsErrTeamDoesNotExist(err))
|
||||
|
|
Loading…
Reference in a new issue