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.
71 lines
1.7 KiB
71 lines
1.7 KiB
package notice |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
|
|
"github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestCreditBan(t *testing.T) { |
|
convey.Convey("Audio", t, func(ctx convey.C) { |
|
var ( |
|
c = context.Background() |
|
oid = int64(0) |
|
) |
|
ctx.Convey("When everything gose positive", func(ctx convey.C) { |
|
title, link, err := d.Ban(c, oid) |
|
ctx.Convey("Then err should be nil.title,link should not be nil.", func(ctx convey.C) { |
|
if err != nil { |
|
ctx.So(err, convey.ShouldNotBeNil) |
|
} else { |
|
ctx.So(err, convey.ShouldBeNil) |
|
} |
|
ctx.So(link, convey.ShouldNotBeNil) |
|
ctx.So(title, convey.ShouldNotBeNil) |
|
}) |
|
}) |
|
}) |
|
} |
|
|
|
func TestNoticeCredit(t *testing.T) { |
|
convey.Convey("Audio", t, func(ctx convey.C) { |
|
var ( |
|
c = context.Background() |
|
oid = int64(0) |
|
) |
|
ctx.Convey("When everything gose positive", func(ctx convey.C) { |
|
title, link, err := d.Credit(c, oid) |
|
ctx.Convey("Then err should be nil.title,link should not be nil.", func(ctx convey.C) { |
|
if err != nil { |
|
ctx.So(err, convey.ShouldNotBeNil) |
|
} else { |
|
ctx.So(err, convey.ShouldBeNil) |
|
} |
|
ctx.So(link, convey.ShouldNotBeNil) |
|
ctx.So(title, convey.ShouldNotBeNil) |
|
}) |
|
}) |
|
}) |
|
} |
|
|
|
func TestNoticeCreditNotice(t *testing.T) { |
|
convey.Convey("Audio", t, func(ctx convey.C) { |
|
var ( |
|
c = context.Background() |
|
oid = int64(0) |
|
) |
|
ctx.Convey("When everything gose positive", func(ctx convey.C) { |
|
title, link, err := d.Notice(c, oid) |
|
ctx.Convey("Then err should be nil.title,link should not be nil.", func(ctx convey.C) { |
|
if err != nil { |
|
ctx.So(err, convey.ShouldNotBeNil) |
|
} else { |
|
ctx.So(err, convey.ShouldBeNil) |
|
} |
|
ctx.So(link, convey.ShouldNotBeNil) |
|
ctx.So(title, convey.ShouldNotBeNil) |
|
}) |
|
}) |
|
}) |
|
}
|
|
|