You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
feat-allow-uploads-document #6
@@ -162,6 +162,10 @@ func TestCreateAccount(t *testing.T) {
|
|||||||
|
|
||||||
td := &TdAccount{}
|
td := &TdAccount{}
|
||||||
td.On("GetAccountsByOrgId", "1").Return(getTestAccounts(), nil)
|
td.On("GetAccountsByOrgId", "1").Return(getTestAccounts(), nil)
|
||||||
|
// Mock GetSplitCountByAccountId for parent account check
|
||||||
|
if test.account.Parent != "" {
|
||||||
|
td.On("GetSplitCountByAccountId", test.account.Parent).Return(int64(0), nil)
|
||||||
|
}
|
||||||
|
|
||||||
model := NewModel(td, nil, types.Config{})
|
model := NewModel(td, nil, types.Config{})
|
||||||
|
|
||||||
@@ -206,6 +210,10 @@ func TestUpdateAccount(t *testing.T) {
|
|||||||
|
|
||||||
td := &TdAccount{}
|
td := &TdAccount{}
|
||||||
td.On("GetAccountsByOrgId", "1").Return(getTestAccounts(), nil)
|
td.On("GetAccountsByOrgId", "1").Return(getTestAccounts(), nil)
|
||||||
|
// Mock GetSplitCountByAccountId for parent account check
|
||||||
|
if test.account.Parent != "" {
|
||||||
|
td.On("GetSplitCountByAccountId", test.account.Parent).Return(int64(0), nil)
|
||||||
|
}
|
||||||
|
|
||||||
model := NewModel(td, nil, types.Config{})
|
model := NewModel(td, nil, types.Config{})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user