package company

import (
	"bordrobot/lib/run"
	"testing"
)

func TestCompany_Create(t *testing.T) {
	err := run.InitDB("../..")
	if err != nil {
		t.Fatal(err)
	}

	c := &Company{
		Name:         "Deneme Firması",
		MemberNumber: "1234",
		Username:     "u1",
		Password:     "p1",
	}

	err = c.Create()
	if err != nil {
		t.Fatal(err)
	}

	run.DB.Close()
}
