Skip to content

Commit bdeb556

Browse files
committed
fixup: remove tests by_user().skip_authz: case is now forbidden
1 parent d8642af commit bdeb556

1 file changed

Lines changed: 0 additions & 36 deletions

File tree

editoast/src/views/authz.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,34 +1814,6 @@ mod tests {
18141814
);
18151815
}
18161816

1817-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1818-
async fn whoami_skip_with_user_info() {
1819-
let app = test_app!().build();
1820-
let user = app
1821-
.user("bob", "Bob")
1822-
.with_roles([Role::Admin])
1823-
.create()
1824-
.await;
1825-
1826-
app.get("/authz/me")
1827-
.by_user(user.as_ref())
1828-
.skip_authz()
1829-
.await
1830-
.assert_status_unauthorized();
1831-
}
1832-
1833-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1834-
async fn whoami_skip_with_unprivileged_user_info() {
1835-
let app = test_app!().build();
1836-
let user = app.user("test", "test").create().await;
1837-
1838-
app.get("/authz/me")
1839-
.by_user(user.as_ref())
1840-
.skip_authz()
1841-
.await
1842-
.assert_status_unauthorized();
1843-
}
1844-
18451817
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
18461818
async fn users_info() {
18471819
let app = test_app!().build();
@@ -1965,14 +1937,6 @@ mod tests {
19651937
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
19661938
async fn user_groups_skip_authz() {
19671939
let app = test_app!().build();
1968-
let user = app.user("test", "test").create().await;
1969-
1970-
// With a user in the request
1971-
app.get("/authz/me/groups")
1972-
.by_user(user.as_ref())
1973-
.skip_authz()
1974-
.await
1975-
.assert_status_unauthorized();
19761940

19771941
// Without a user in the request
19781942
app.get("/authz/me/groups")

0 commit comments

Comments
 (0)