-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CLI command
invite user
generating a device invitation link ins…
- Loading branch information
1 parent
7a803f3
commit 3e09e77
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |