aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/tests/util')
-rw-r--r--crates/shirabe/tests/util/bitbucket_test.rs10
-rw-r--r--crates/shirabe/tests/util/git_test.rs4
-rw-r--r--crates/shirabe/tests/util/perforce_test.rs6
3 files changed, 11 insertions, 9 deletions
diff --git a/crates/shirabe/tests/util/bitbucket_test.rs b/crates/shirabe/tests/util/bitbucket_test.rs
index e0fb9ef2..19641fed 100644
--- a/crates/shirabe/tests/util/bitbucket_test.rs
+++ b/crates/shirabe/tests/util/bitbucket_test.rs
@@ -555,7 +555,11 @@ fn test_get_token_without_access_token() {
fn test_authorize_oauth_with_wrong_origin_url() {
let config = ConfigStubBuilder::new().build_shared();
let mut f = set_up_with_config_and_http(config, vec![]);
- assert!(!f.bitbucket.authorize_oauth(&format!("non-{}", ORIGIN)));
+ assert!(
+ !f.bitbucket
+ .authorize_oauth(&format!("non-{}", ORIGIN))
+ .unwrap()
+ );
}
#[test]
@@ -578,7 +582,7 @@ fn test_authorize_oauth_without_available_git_config_token() {
let mut bitbucket =
Bitbucket::new(io, config, Some(process), Some(http_downloader), Some(time)).unwrap();
- assert!(!bitbucket.authorize_oauth(ORIGIN));
+ assert!(!bitbucket.authorize_oauth(ORIGIN).unwrap());
}
#[test]
@@ -595,5 +599,5 @@ fn test_authorize_oauth_with_available_git_config_token() {
let mut bitbucket =
Bitbucket::new(io, config, Some(process), Some(http_downloader), Some(time)).unwrap();
- assert!(bitbucket.authorize_oauth(ORIGIN));
+ assert!(bitbucket.authorize_oauth(ORIGIN).unwrap());
}
diff --git a/crates/shirabe/tests/util/git_test.rs b/crates/shirabe/tests/util/git_test.rs
index 3d447553..448935ec 100644
--- a/crates/shirabe/tests/util/git_test.rs
+++ b/crates/shirabe/tests/util/git_test.rs
@@ -68,10 +68,6 @@ impl ConfigSourceInterface for NullConfigSource {
}
}
-// PHP's `commandCallable` returns a bare string (`'git command'`); Rust's `run_command`
-// flattens each callable to a `Vec<String>` and hands it to `execute_args`, which always
-// builds a `PhpMixed::List`. So the single-token string command becomes a one-element list,
-// and the corresponding process expectation is a one-element list as well.
fn build_git(
io: IOStub,
config: Config,
diff --git a/crates/shirabe/tests/util/perforce_test.rs b/crates/shirabe/tests/util/perforce_test.rs
index dfeae457..76ea3f8e 100644
--- a/crates/shirabe/tests/util/perforce_test.rs
+++ b/crates/shirabe/tests/util/perforce_test.rs
@@ -823,7 +823,8 @@ fn test_check_server_exists() {
);
let result =
- Perforce::check_server_exists("perforce.does.exist:port", &mut process.borrow_mut());
+ Perforce::check_server_exists("perforce.does.exist:port", &mut process.borrow_mut())
+ .unwrap();
assert!(result);
}
@@ -843,7 +844,8 @@ fn test_check_server_client_error() {
);
let result =
- Perforce::check_server_exists("perforce.does.exist:port", &mut process.borrow_mut());
+ Perforce::check_server_exists("perforce.does.exist:port", &mut process.borrow_mut())
+ .unwrap();
assert!(!result);
}