Skip to content

Commit

Permalink
slightly improve &str to octocrab params state unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Jul 25, 2024
1 parent feb838a commit 22f2146
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/concourse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Source {
}
// return unwrapped value with default false for ease of use
pub(crate) fn skip_check(&self) -> bool {
return self.skip_check.unwrap_or(false)
return self.skip_check.unwrap_or(false);
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/github_issue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,12 @@ mod tests {
#[test]
fn test_str_to_params_state() {
// octocrab::params::State does not implement Eq
str_to_params_state("Open").unwrap();
str_to_params_state("Closed").unwrap();
str_to_params_state("All").unwrap();
str_to_params_state("Open")
.expect("could not convert \"Open\" to octocrab::params::State::Open");
str_to_params_state("Closed")
.expect("could not convert \"Closed\" to octocrab::params::State::Closed");
str_to_params_state("All")
.expect("could not convert \"All\" to octocrab::params::State::All");
}

#[test]
Expand Down

0 comments on commit 22f2146

Please sign in to comment.