Skip to content

Assert reply_key for RetrievedOriginalPayload#1152

Merged
spacebear21 merged 1 commit intopayjoin:masterfrom
benalleng:mutants-10-06-25
Oct 6, 2025
Merged

Assert reply_key for RetrievedOriginalPayload#1152
spacebear21 merged 1 commit intopayjoin:masterfrom
benalleng:mutants-10-06-25

Conversation

@benalleng
Copy link
Collaborator

Fixes the mutant in #1151

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Collaborator

coveralls commented Oct 6, 2025

Pull Request Test Coverage Report for Build 18288262677

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 84.217%

Totals Coverage Status
Change from base Build 18286617728: 0.007%
Covered Lines: 8954
Relevant Lines: 10632

💛 - Coveralls

reply_key: reply_key.clone(),
});
assert_eq!(
SessionHistory { events: events.clone() }.session_context().reply_key,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SessionHistory { events: events.clone() }.session_context().reply_key,
SessionHistory::new(events.clone()).session_context().reply_key,

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it might be less hacky to test for the presence of the reply_key in run_session_history_test? It's a bit of a special case because it's session_context() is a private function but if the goal is to assert that a reply_key is present on sessions that retrieved the original payload I feel like the tests should be more systematic about that.

@benalleng
Copy link
Collaborator Author

Ok, thats fair, I just created a match block in run_session_history_test that checks if there is a RetrievedOriginalProposal event and checks for the reply_key then

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2bb3e72

@spacebear21 spacebear21 merged commit b97ffb7 into payjoin:master Oct 6, 2025
10 checks passed
@benalleng benalleng mentioned this pull request Oct 6, 2025
@benalleng benalleng deleted the mutants-10-06-25 branch October 6, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants