Skip to content

Commit 0360517

Browse files
committed
refactor: [#615] changed status code so tests pass
1 parent 6010155 commit 0360517

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/e2e/web/api/v1/contexts/category/contract.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async fn it_should_not_allow_adding_a_new_category_to_unauthenticated_users() {
6161
})
6262
.await;
6363

64-
assert_eq!(response.status, 401);
64+
assert_eq!(response.status, 403);
6565
}
6666

6767
#[tokio::test]
@@ -194,5 +194,5 @@ async fn it_should_not_allow_guests_to_delete_categories() {
194194
})
195195
.await;
196196

197-
assert_eq!(response.status, 401);
197+
assert_eq!(response.status, 403);
198198
}

tests/e2e/web/api/v1/contexts/tag/contract.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async fn it_should_not_allow_adding_a_new_tag_to_unauthenticated_users() {
6363
})
6464
.await;
6565

66-
assert_eq!(response.status, 401);
66+
assert_eq!(response.status, 403);
6767
}
6868

6969
#[tokio::test]
@@ -174,5 +174,5 @@ async fn it_should_not_allow_guests_to_delete_tags() {
174174

175175
let response = client.delete_tag(DeleteTagForm { tag_id }).await;
176176

177-
assert_eq!(response.status, 401);
177+
assert_eq!(response.status, 403);
178178
}

tests/e2e/web/api/v1/contexts/user/contract.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@ mod banned_user_list {
231231

232232
let response = client.ban_user(Username::new(registered_user.username.clone())).await;
233233

234-
assert_eq!(response.status, 401);
234+
assert_eq!(response.status, 403);
235235
}
236236
}

0 commit comments

Comments
 (0)