probo/models/group_test.go
2023-12-05 22:11:08 +01:00

31 lines
702 B
Go

package models
import (
"github.com/remogatto/prettytest"
)
type groupTestSuite struct {
prettytest.Suite
}
func (t *groupTestSuite) TestMarshal() {
t.Pending()
// group := &Group{
// Name: "Example group",
// Participants: []*Participant{
// {"123", "John", "Doe", 12345, map[string]string{"class": "1 D LIN", "age": "18"}},
// {"456", "Jack", "Sparrow", 67890, map[string]string{"class": "1 D LIN", "age": "24"}},
// },
// }
// expected := `id,firstname,lastname,token,attributes
// 123,John,Doe,12345,"age:18,class:1 D LIN"
// 456,Jack,Sparrow,67890,"age:24,class:1 D LIN"
// `
// csv, err := group.Marshal()
// t.Nil(err)
// t.Equal(expected, string(csv))
}