package dao import ( "context" "testing" "github.com/smartystreets/goconvey/convey" ) func TestDaoUserTelDuplicate(t *testing.T) { convey.Convey("UserTelDuplicate", t, func(ctx convey.C) { var ( c = context.Background() ) ctx.Convey("When everything gose positive", func(ctx convey.C) { res, err := d.UserTelDuplicate(c) ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) { ctx.So(err, convey.ShouldBeNil) ctx.So(res, convey.ShouldBeNil) }) }) }) } func TestDaoUserEmailDuplicate(t *testing.T) { convey.Convey("UserEmailDuplicate", t, func(ctx convey.C) { var ( c = context.Background() ) ctx.Convey("When everything gose positive", func(ctx convey.C) { res, err := d.UserEmailDuplicate(c) ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) { ctx.So(err, convey.ShouldBeNil) ctx.So(res, convey.ShouldBeNil) }) }) }) } func TestDaoUpdateUserTelDuplicateStatus(t *testing.T) { convey.Convey("UpdateUserTelDuplicateStatus", t, func(ctx convey.C) { var ( c = context.Background() id = int64(0) ) ctx.Convey("When everything gose positive", func(ctx convey.C) { affected, err := d.UpdateUserTelDuplicateStatus(c, id) ctx.Convey("Then err should be nil.affected should not be nil.", func(ctx convey.C) { ctx.So(err, convey.ShouldBeNil) ctx.So(affected, convey.ShouldNotBeNil) }) }) }) } func TestDaoUpdateUserEmailDuplicateStatus(t *testing.T) { convey.Convey("UpdateUserEmailDuplicateStatus", t, func(ctx convey.C) { var ( c = context.Background() id = int64(0) ) ctx.Convey("When everything gose positive", func(ctx convey.C) { affected, err := d.UpdateUserEmailDuplicateStatus(c, id) ctx.Convey("Then err should be nil.affected should not be nil.", func(ctx convey.C) { ctx.So(err, convey.ShouldBeNil) ctx.So(affected, convey.ShouldNotBeNil) }) }) }) }