34 lines
962 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 приложение")
}