func TestBranchView_Unmount(t *testing.T) { cb := ctests.New(t).SetApp(true, true, false) defer cb.Finish() b := NewBranchView(cb.Ctx(), models.NewBranchModel(cb.Ctx(), &models.RootContents{Name: "a"})) c := mock_vecty.NewMockComponent(cb.GetMock()) c.EXPECT().Unmount() b.Body = c b.Unmount() assert.Nil(t, b.Notifs) }
func (cb *ClientContextBuilder) ExpectReconcile(comp *vecty.Composite) *ClientContextBuilder { c := mock_vecty.NewMockComponent(cb.GetMock()) c.EXPECT().Reconcile(nil) comp.RenderFunc = func() vecty.Component { return c } return cb }