Exemplo n.º 1
0
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)
}
Exemplo n.º 2
0
Arquivo: ctests.go Projeto: kego/ke
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
}