I did
func TestProvisionhistory(t *testing.T) {
type fields struct {
Status Status
Type BookingType
Updated time.Time
History []BookingHistory
}
type args struct {
b *Booking
}
tests := []struct {
name string
fields fields
args args
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
bl := &BookingListing{
Status: tt.fields.Status}
if bl.Status == StatusExpired && bl.Status != StatusCancelled {
t.Error("expecting status of bookinglisting to be active")
}
bl.provisionHistory(tt.args.b)
})
}
}
now i am getting ok in the terminal
is this all that is required from writing If b1.status test code
Thanks and Regards/-
*Dr.Lincy Elizebeth Jim,*
On Mon, Mar 29, 2021 at 6:20 PM Brian Candler <[email protected]> wrote:
> Can you make a complete, runnable example which demonstrates the problem,
> on play.golang.org, and post the link here?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/gxtF2eEzjLI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/dabb8639-fec8-4c28-bab2-9d4484dd7716n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/dabb8639-fec8-4c28-bab2-9d4484dd7716n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAMcLrA85rraSxLuw7CnF4gg1nphqOhu%3D%3DNm68DzQWG_oh8XU0Q%40mail.gmail.com.