generated from VLADIMIR/template
add stat and fix get place
This commit is contained in:
@@ -13,7 +13,7 @@ func TestGetApplication(t *testing.T) {
|
||||
defer close()
|
||||
|
||||
createTeamResp, err := createTeam(client, "Тестовая команда")
|
||||
assert.Nil(t, err, "запрос отправлену спешно")
|
||||
assert.Nil(t, err, "запрос отправлен успешно")
|
||||
|
||||
team := createTeamResp.Teams[0]
|
||||
|
||||
|
||||
@@ -79,3 +79,10 @@ func addAction(
|
||||
_, err := client.AddAction(ctx, req)
|
||||
assert.Nil(t, err, "запрос отправлен успешно")
|
||||
}
|
||||
|
||||
func getGraph(client pb.EveningDetectiveClient) (*pb.GetGraphRsp, error) {
|
||||
ctx, cancel := getContext()
|
||||
defer cancel()
|
||||
req := &pb.GetGraphReq{}
|
||||
return client.GetGraph(ctx, req)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_StoryStatistics(t *testing.T) {
|
||||
client, close := getClient()
|
||||
defer close()
|
||||
|
||||
getGraphResp, err := getGraph(client)
|
||||
assert.Nil(t, err, "запрос отправлен успешно")
|
||||
|
||||
assert.Equal(t, 5, int(getGraphResp.CountNodes))
|
||||
assert.Equal(t, 3, int(getGraphResp.CountEdges))
|
||||
}
|
||||
@@ -3,8 +3,32 @@
|
||||
{
|
||||
"code": "Т-1",
|
||||
"name": "Точка 1",
|
||||
"text": "Текст точки 1",
|
||||
"text": "Текст точки 1([Т-2])([Т-3])",
|
||||
"applications": [{ "name": "application 1" }]
|
||||
},
|
||||
{
|
||||
"code": "Т-2",
|
||||
"name": "Точка 2",
|
||||
"text": "Текст точки 2([Т-4])",
|
||||
"applications": [{ "name": "application 2" }]
|
||||
},
|
||||
{
|
||||
"code": "Т-3",
|
||||
"name": "Точка 3",
|
||||
"text": "Текст точки 3",
|
||||
"applications": [{ "name": "application 3" }]
|
||||
},
|
||||
{
|
||||
"code": "Т-4",
|
||||
"name": "Точка 4",
|
||||
"text": "Текст точки 4",
|
||||
"applications": [{ "name": "application 4" }]
|
||||
},
|
||||
{
|
||||
"code": "Т-5",
|
||||
"name": "Точка 5",
|
||||
"text": "Текст точки 5",
|
||||
"applications": [{ "name": "application 5" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user