Esempio n. 1
0
func TestTableStoreSliceLoad(t *testing.T) {
	dbc := csdb.MustConnectTest()
	defer dbc.Close()
	dbrSess := dbc.NewSession()

	var stores store.TableStoreSlice
	stores.SQLSelect(dbrSess)
	assert.True(t, stores.Len() >= 2) // @todo proper test data in database
	for _, s := range stores {
		assert.True(t, len(s.Code.String) > 1)
	}
}
Esempio n. 2
0
func TestTableStoreSliceLoad(t *testing.T) {
	defer debugLogBuf.Reset()
	dbc := csdb.MustConnectTest()
	defer func() { assert.NoError(t, dbc.Close()) }()
	dbrSess := dbc.NewSession()

	var stores store.TableStoreSlice
	_, err := stores.SQLSelect(dbrSess)
	assert.NoError(t, err)
	assert.True(t, stores.Len() >= 2) // @todo proper test data in database
	for _, s := range stores {
		assert.True(t, len(s.Code.String) > 1)
	}
}