Skip to content

Commit

Permalink
examples: Simplify tutorials/basic-3 test (coral-xyz#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
keemy authored and johnrees committed May 30, 2021
1 parent 73f7b27 commit 6b0bac5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/tutorial/basic-3/programs/puppet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anchor_lang::prelude::*;

#[program]
mod puppet {
pub mod puppet {
use super::*;
pub fn initialize(ctx: Context<Initialize>) -> ProgramResult {
Ok(())
Expand Down
12 changes: 1 addition & 11 deletions examples/tutorial/basic-3/tests/basic-3.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@ describe("basic-3", () => {
rent: anchor.web3.SYSVAR_RENT_PUBKEY,
},
signers: [newPuppetAccount],
instructions: [
anchor.web3.SystemProgram.createAccount({
fromPubkey: provider.wallet.publicKey,
newAccountPubkey: newPuppetAccount.publicKey,
space: 8 + 8, // Add 8 for the account discriminator.
lamports: await provider.connection.getMinimumBalanceForRentExemption(
8 + 8
),
programId: puppet.programId,
}),
],
instructions: [await puppet.account.puppet.createInstruction(newPuppetAccount)],
});

// Invoke the puppet master to perform a CPI to the puppet.
Expand Down

0 comments on commit 6b0bac5

Please sign in to comment.