Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Fix failing tests for session
Browse files Browse the repository at this point in the history
  • Loading branch information
abishekk92 committed Jul 21, 2023
1 parent b1a5200 commit dd58270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
15 changes: 3 additions & 12 deletions tests/gpl_core/connection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,11 @@ describe("Connection", async () => {
payer: testUser.publicKey,
authority: testUser.publicKey,
screenName: testScreenName,
});
})
.signers([testUser]);
const testProfilePubKeys = await testProfile.pubkeys();
testProfilePDA = testProfilePubKeys.profile as anchor.web3.PublicKey;
const testProfileTx = await testProfile.transaction();
testProfileTx.recentBlockhash = (
await rpcConnection.getLatestBlockhash()
).blockhash;
testProfileTx.feePayer = testUser.publicKey;
const signedTransaction = await testUserWallet.signTransaction(
testProfileTx
);
await sendAndConfirmTransaction(rpcConnection, signedTransaction, [
testUser,
]);
await testProfile.rpc();
});

it("should create a connection", async () => {
Expand Down
15 changes: 3 additions & 12 deletions tests/gpl_core/post.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,11 @@ describe("Post", async () => {
payer: randomUser.publicKey,
authority: randomUser.publicKey,
screenName,
});
})
.signers([randomUser]);
const testProfilePubKeys = await testProfile.pubkeys();
randomProfilePDA = testProfilePubKeys.profile as anchor.web3.PublicKey;
const testProfileTx = await testProfile.transaction();
testProfileTx.recentBlockhash = (
await rpcConnection.getLatestBlockhash()
).blockhash;
testProfileTx.feePayer = randomUser.publicKey;
const signedTransaction = await randomUserWallet.signTransaction(
testProfileTx
);
await sendAndConfirmTransaction(rpcConnection, signedTransaction, [
randomUser,
]);
await testProfile.rpc();

// Create a session
// @ts-ignore
Expand Down

0 comments on commit dd58270

Please sign in to comment.