Skip to content

Commit

Permalink
still messed up
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiemontese committed Nov 25, 2024
1 parent 4341b49 commit 37ac847
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/tests/mocks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,14 @@ pub fn event_with_options_mock(
client_mock
.expect_event_with_options()
.once()
.withf(move |called_metric, called_text, called_tags, called_options| {
called_metric == metric
&& called_text == text
&& called_tags.iter().all(|tag| tags.contains(&tag.as_str()))
&& matches!((called_options, options), (Some(_), Some(_)) | (None, None))
})
.with(
eq(metric),
eq(text),
function(move |called_tags: &Vec<String>| called_tags.iter().all(|tag| tags.contains(&tag.as_str()))),
function(move |called_options: &Option<EventOptions<'static>>| {
matches!((called_options, options), (Some(_), Some(_)) | (None, None))
}),
)
.return_const(());

client_mock
Expand Down

0 comments on commit 37ac847

Please sign in to comment.