Test empty address in RestClient.authAccounts

This commit is contained in:
Simon Warta 2020-02-17 12:31:41 +01:00
parent 7bc76bd59b
commit 03f01f54d6

View File

@ -290,6 +290,18 @@ describe("RestClient", () => {
}),
);
});
// This property is used by CosmWasmClient.getAccount
it("returns empty address for non-existent account", async () => {
pendingWithoutCosmos();
const client = new RestClient(httpUrl);
const nonExistentAccount = makeRandomAddress();
const { result } = await client.authAccounts(nonExistentAccount);
expect(result).toEqual({
type: "cosmos-sdk/Account",
value: jasmine.objectContaining({ address: "" }),
});
});
});
describe("encodeTx", () => {