Add SetDB test for vat move
This commit is contained in:
parent
32654ffabc
commit
177d212cc4
@ -64,6 +64,4 @@ func (repository *MockVatMoveRepository) SetCheckedHeaderError(e error) {
|
||||
repository.CheckedHeaderError = e
|
||||
}
|
||||
|
||||
func (repository *MockVatMoveRepository) SetDB(db *postgres.DB) {
|
||||
// TODO Implement passed DB
|
||||
}
|
||||
func (repository *MockVatMoveRepository) SetDB(db *postgres.DB) {}
|
||||
|
@ -19,6 +19,7 @@ import (
|
||||
)
|
||||
|
||||
var VatMoveConfig = shared.TransformerConfig{
|
||||
TransformerName: "vat move",
|
||||
ContractAddresses: []string{shared.VatContractAddress},
|
||||
ContractAbi: shared.VatABI,
|
||||
Topics: []string{shared.VatMoveSignature},
|
||||
|
@ -190,4 +190,13 @@ var _ = Describe("Vat Move", func() {
|
||||
Expect(headerChecked).To(BeTrue())
|
||||
})
|
||||
})
|
||||
|
||||
Describe("SetDB", func() {
|
||||
It("sets the repository db", func() {
|
||||
vatMoveRepository.DB = nil
|
||||
Expect(vatMoveRepository.DB).To(BeNil())
|
||||
vatMoveRepository.SetDB(db)
|
||||
Expect(vatMoveRepository.DB).To(Equal(db))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -47,10 +47,10 @@ var _ = Describe("Vat move transformer", func() {
|
||||
|
||||
It("gets missing headers for block numbers specified in config", func() {
|
||||
transformer := factories.Transformer{
|
||||
Config: vat_move.VatMoveConfig,
|
||||
Config: config,
|
||||
Converter: &converter,
|
||||
Repository: &repository,
|
||||
Fetcher: &fetcher,
|
||||
Fetcher: &fetcher,
|
||||
}.NewTransformer(nil, nil)
|
||||
|
||||
err := transformer.Execute()
|
||||
|
Loading…
Reference in New Issue
Block a user