generated from VLADIMIR/template
fix double applications
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetApplication(t *testing.T) {
|
||||
defer deleteTeams(t)
|
||||
|
||||
client, close := getClient()
|
||||
defer close()
|
||||
|
||||
createTeamResp, err := createTeam(client, "Тестовая команда")
|
||||
assert.Nil(t, err, "запрос отправлену спешно")
|
||||
|
||||
team := createTeamResp.Teams[0]
|
||||
|
||||
addAction(t, client, team.Name, team.Password, "Т-1")
|
||||
|
||||
getTeamsResp, err := getTeams(client)
|
||||
assert.Nil(t, err, "запрос отправлен успешно")
|
||||
applications := getTeamsResp.Teams[0].Applications
|
||||
assert.Equal(t, 1, len(applications), "выдать 1 приложение")
|
||||
|
||||
addAction(t, client, team.Name, team.Password, "Т-1")
|
||||
|
||||
getTeamsResp, err = getTeams(client)
|
||||
assert.Nil(t, err, "запрос отправлен успешно")
|
||||
applications = getTeamsResp.Teams[0].Applications
|
||||
assert.Equal(t, 1, len(applications), "выдать 1 приложение")
|
||||
}
|
||||
Reference in New Issue
Block a user