web unit-tests #7

Open
malled wants to merge 8 commits from unit-tests into main
Owner
No description provided.
test different unauthorized door open scenarios
All checks were successful
CI - Rust Check and Test / check-and-test (pull_request) Successful in 4m49s
522e398b90
soerface approved these changes 2026-05-26 17:49:57 +00:00
@ -0,0 +173,4 @@
let response = client.get("/status").dispatch().await;
assert_eq!(response.status(), Status::Ok);
let state: DoorWebState = response.into_json().await.unwrap();
assert_eq!(state.state.get("indoor"), Some(&DoorState::Closed));
Owner

I suggest setting the door state before the action explicitly to "open", so it's obvious that the action did indeed change the door status.

I suggest setting the door state before the action explicitly to "open", so it's obvious that the action did indeed change the door status.
@ -0,0 +193,4 @@
let response = client.get("/status").dispatch().await;
assert_eq!(response.status(), Status::Ok);
let state: DoorWebState = response.into_json().await.unwrap();
assert_eq!(state.state.get("indoor"), Some(&DoorState::Open));
Owner

I suggest setting the door state before the action explicitly to "closed", so it's obvious that the action did indeed change the door status.

I suggest setting the door state before the action explicitly to "closed", so it's obvious that the action did indeed change the door status.
@ -0,0 +29,4 @@
static TEST_KEYS: Lazy<TestKeys> = Lazy::new(generate_test_keys);
/// Generate a fresh RSA-2048 key pair and return everything needed for
Owner

RSA-512

RSA-512
All checks were successful
CI - Rust Check and Test / check-and-test (pull_request) Successful in 4m49s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin unit-tests:unit-tests
git switch unit-tests

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff unit-tests
git switch unit-tests
git rebase main
git switch main
git merge --ff-only unit-tests
git switch unit-tests
git rebase main
git switch main
git merge --no-ff unit-tests
git switch main
git merge --squash unit-tests
git switch main
git merge --ff-only unit-tests
git switch main
git merge unit-tests
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
flipdot/flipdoor!7
No description provided.