You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
445 B

  1. package gamesrv
  2. import (
  3. "fmt"
  4. "testing"
  5. "github.com/arnaucube/gogame/database"
  6. "github.com/stretchr/testify/assert"
  7. "gopkg.in/mgo.v2/bson"
  8. )
  9. func TestCreatePlanet(t *testing.T) {
  10. db, err := database.New("127.0.0.1:27017", "gogametests")
  11. assert.Nil(t, err)
  12. srv := New(db)
  13. solarSystem, planet, err := srv.CreatePlanet(bson.ObjectIdHex("5d029a6ff18ba24f406168fe"))
  14. assert.Nil(t, err)
  15. fmt.Println(solarSystem)
  16. fmt.Println(planet)
  17. }