ready for rpa
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package company
|
||||
|
||||
import (
|
||||
"bordrobot/lib/db"
|
||||
"bordrobot/lib/run"
|
||||
)
|
||||
|
||||
type Company struct {
|
||||
@@ -16,6 +16,6 @@ func (c *Company) Create() error {
|
||||
insert into company (name, member_number, username, password)
|
||||
VALUES (:name, :member_number, :username, :password)
|
||||
`
|
||||
_, err := db.DB.NamedExec(sq, &c)
|
||||
_, err := run.DB.NamedExec(sq, &c)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package company
|
||||
|
||||
import (
|
||||
"bordrobot/lib/db"
|
||||
"bordrobot/lib/run"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCompany_Create(t *testing.T) {
|
||||
err := db.InitDB("../..")
|
||||
err := run.InitDB("../..")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -23,5 +23,5 @@ func TestCompany_Create(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
db.DB.Close()
|
||||
run.DB.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user