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
|
repository.CheckedHeaderError = e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repository *MockVatMoveRepository) SetDB(db *postgres.DB) {
|
func (repository *MockVatMoveRepository) SetDB(db *postgres.DB) {}
|
||||||
// TODO Implement passed DB
|
|
||||||
}
|
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var VatMoveConfig = shared.TransformerConfig{
|
var VatMoveConfig = shared.TransformerConfig{
|
||||||
|
TransformerName: "vat move",
|
||||||
ContractAddresses: []string{shared.VatContractAddress},
|
ContractAddresses: []string{shared.VatContractAddress},
|
||||||
ContractAbi: shared.VatABI,
|
ContractAbi: shared.VatABI,
|
||||||
Topics: []string{shared.VatMoveSignature},
|
Topics: []string{shared.VatMoveSignature},
|
||||||
|
@ -190,4 +190,13 @@ var _ = Describe("Vat Move", func() {
|
|||||||
Expect(headerChecked).To(BeTrue())
|
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,7 +47,7 @@ var _ = Describe("Vat move transformer", func() {
|
|||||||
|
|
||||||
It("gets missing headers for block numbers specified in config", func() {
|
It("gets missing headers for block numbers specified in config", func() {
|
||||||
transformer := factories.Transformer{
|
transformer := factories.Transformer{
|
||||||
Config: vat_move.VatMoveConfig,
|
Config: config,
|
||||||
Converter: &converter,
|
Converter: &converter,
|
||||||
Repository: &repository,
|
Repository: &repository,
|
||||||
Fetcher: &fetcher,
|
Fetcher: &fetcher,
|
||||||
|
Loading…
Reference in New Issue
Block a user