mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Adds another addresses provider test
This commit is contained in:
parent
06d16c6abf
commit
2a5547570c
|
@ -18,6 +18,45 @@ makeSuite('AddressesProviderRegistry', (testEnv: TestEnv) => {
|
|||
|
||||
});
|
||||
|
||||
it('Checks the addresses provider is added to the registry', async () => {
|
||||
|
||||
const {addressesProvider, registry} = testEnv;
|
||||
|
||||
const providers = await registry.getAddressesProvidersList();
|
||||
|
||||
expect(providers.length).to.be.equal(1, "Invalid length of the addresses providers list");
|
||||
expect(providers[1].toString()).to.be.equal(addressesProvider.address, " Invalid addresses provider added to the list");
|
||||
|
||||
});
|
||||
|
||||
it('Registers a new mock addresses provider', async () => {
|
||||
|
||||
const {users, registry} = testEnv;
|
||||
|
||||
//simulating an addresses provider using the users[1] wallet address
|
||||
await registry.registerAddressesProvider(users[1].address, "2");
|
||||
|
||||
const providers = await registry.getAddressesProvidersList();
|
||||
|
||||
expect(providers.length).to.be.equal(2, "Invalid length of the addresses providers list");
|
||||
expect(providers[2].toString()).to.be.equal(users[1].address, " Invalid addresses provider added to the list");
|
||||
|
||||
});
|
||||
|
||||
it('Registers a new mock addresses provider', async () => {
|
||||
|
||||
const {users, registry} = testEnv;
|
||||
|
||||
//simulating an addresses provider using the users[1] wallet address
|
||||
await registry.registerAddressesProvider(users[1].address, "2");
|
||||
|
||||
const providers = await registry.getAddressesProvidersList();
|
||||
|
||||
expect(providers.length).to.be.equal(2, "Invalid length of the addresses providers list");
|
||||
expect(providers[2].toString()).to.be.equal(users[1].address, " Invalid addresses provider added to the list");
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user