fix unit test ordering issue in 1.5

This commit is contained in:
Brad Rydzewski 2015-08-20 10:57:46 -07:00
parent 0379b13521
commit a0cbba5a95

View file

@ -33,6 +33,7 @@ func TestBuild(t *testing.T) {
})
g.It("Should send", func() {
em := map[string]bool{"foo": true, "bar": true}
e1 := &bus.Event{Name: "foo"}
e2 := &bus.Event{Name: "bar"}
c := make(chan *bus.Event)
@ -42,8 +43,8 @@ func TestBuild(t *testing.T) {
b.Send(e2)
r1 := <-c
r2 := <-c
g.Assert(e1).Equal(r1)
g.Assert(e2).Equal(r2)
g.Assert(em[r1.Name]).Equal(true)
g.Assert(em[r2.Name]).Equal(true)
})
})