Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@ -0,0 +1,49 @@
package dao
import (
"strconv"
"testing"
"time"
"go-common/app/admin/ep/marthe/model"
. "github.com/smartystreets/goconvey/convey"
)
var (
tmpIssueNoStr2 = strconv.FormatInt(time.Now().Unix(), 10)
buglyVersion = &model.BuglyVersion{
Version: "Version" + tmpIssueNoStr2,
BuglyProjectID: 1,
Action: model.BuglyVersionActionDisable,
TaskStatus: 1,
UpdateBy: "fengyifeng",
}
)
func Test_Bugly_Version(t *testing.T) {
Convey("test insert bugly Version", t, func() {
err := d.InsertBuglyVersion(buglyVersion)
So(err, ShouldBeNil)
})
Convey("test update bugly Version", t, func() {
buglyVersion.Version = "update" + tmpIssueNoStr2
err := d.UpdateBuglyVersion(buglyVersion)
So(err, ShouldBeNil)
})
Convey("test Query Bugly Version By Version", t, func() {
tmpBuglyVersion, err := d.QueryBuglyVersionByVersion(buglyVersion.Version)
So(err, ShouldBeNil)
So(tmpBuglyVersion.Version, ShouldEqual, buglyVersion.Version)
})
Convey("test Query Bugly Version By Id", t, func() {
tmpBuglyVersion, err := d.QueryBuglyVersion(buglyVersion.ID)
So(err, ShouldBeNil)
So(tmpBuglyVersion.Version, ShouldEqual, buglyVersion.Version)
})
}