-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: [#109] E2E test for category routes
- Loading branch information
1 parent
652f50b
commit 73a26ae
Showing
7 changed files
with
38 additions
and
7 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
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
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,21 @@ | ||
use crate::e2e::asserts::assert_json_ok; | ||
use crate::e2e::env::TestEnv; | ||
use crate::e2e::http::Query; | ||
|
||
#[tokio::test] | ||
#[cfg_attr(not(feature = "e2e-tests"), ignore)] | ||
async fn it_should_return_an_empty_category_list_when_there_are_no_categories() { | ||
let client = TestEnv::default().unauthenticated_client(); | ||
|
||
let response = client.get("category", Query::empty()).await; | ||
|
||
assert_json_ok(&response); | ||
} | ||
|
||
/* todo: | ||
- it_should_not_allow_adding_a_new_category_to_unauthenticated_clients | ||
- it should allow adding a new category to authenticated clients | ||
- it should not allow adding a new category with an empty name | ||
- it should not allow adding a new category with an empty icon | ||
- ... | ||
*/ |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod about; | ||
|
||
pub mod category; | ||
pub mod root; |
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