Skip to content

Commit

Permalink
Fix CLI command invite user generating a device invitation link ins…
Browse files Browse the repository at this point in the history
…tead of a user invitation link. (#9187)

Closes #9186
  • Loading branch information
FirelightFlagboy committed Dec 18, 2024
1 parent ac3d45d commit d22a42e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cli/tests/integration/invitations/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ use crate::{
#[rstest::rstest]
#[tokio::test]
async fn invite_user(tmp_path: TmpPath) {
let (_, TestOrganization { alice, .. }, _) = bootstrap_cli_test(&tmp_path).await.unwrap();

let (addr, TestOrganization { alice, .. }, org_id) =
bootstrap_cli_test(&tmp_path).await.unwrap();

let mut addr = addr.to_url();
addr.path_segments_mut().unwrap().push(org_id.as_ref());
addr.query_pairs_mut()
.append_pair("a", "claim_user")
.append_key_only("p");
crate::assert_cmd_success!(
with_password = DEFAULT_DEVICE_PASSWORD,
"invite",
Expand All @@ -27,7 +33,9 @@ async fn invite_user(tmp_path: TmpPath) {
"--email",
"[email protected]"
)
.stdout(predicates::str::contains("Invitation URL:"));
.stdout(predicates::str::contains(format!(
"Invitation URL: {YELLOW}{addr}"
)));
}

#[rstest::rstest]
Expand Down
1 change: 1 addition & 0 deletions newsfragments/9186.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix CLI command ``invite user`` generating a device invitation link instead of a user invitation link.

0 comments on commit d22a42e

Please sign in to comment.