Skip to content

Commit

Permalink
Fix test message building
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed May 24, 2024
1 parent 66a9734 commit 0bf03de
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions odilia-notify/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ mod tests {
#[test]
fn correctly_formatted_message_leads_to_a_correct_notification() -> Result<(), zbus::Error>
{
// Simulate a method call to the org.freedesktop.notifications interface
let message = Message::method(
Some(":0.1"), //I can't pass none here, because of type needed errors, so passing dummy values for now
Some(":0.3"), //same here
"/org/freedesktop/notifications",
Some("org.freedesktop.notifications"),
"notify",
&(
let message = Message::method("/org/freedesktop/notifications", "notify")?
.sender(":0.1")?
.interface("org.freedesktop.notifications")?
.build(&(
"ExampleApp",
0u32,
"summary",
Expand All @@ -67,11 +63,7 @@ mod tests {
Vec::<&str>::new(),
HashMap::<&str, Value>::new(),
0,
),
)?;

//make this into an arc, to use the try_from implementation used in the wild
let message = Arc::new(message);
))?;
// Convert the Message into a Notification
let notification = Notification::try_from(message)?;

Expand Down

0 comments on commit 0bf03de

Please sign in to comment.