Reputation: 736
fn do_check(&mut self) -> Result<()> {
let caller = self.env().caller();
...
}
I am writing a test function for do_check
function. Here, I want to set a caller but not sure how to do that.
#[cfg(test)]
mod tests {
use super::*;
use ink_lang as ink;
#[ink::test]
fn do_check_works() {
let mut test = Test::new();
// here I want to set a caller for calling do_check
test.do_check();
...
Upvotes: 2
Views: 376