Skip to content

Commit 660e38e

Browse files
authored
Add extractors and auth handlers tests (#176)
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
1 parent bab2b62 commit 660e38e

File tree

23 files changed

+2538
-86
lines changed

23 files changed

+2538
-86
lines changed

ocg-server/src/handlers/auth.rs

Lines changed: 1974 additions & 1 deletion
Large diffs are not rendered by default.

ocg-server/src/handlers/community/explore.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ mod tests {
339339
use crate::{
340340
db::mock::MockDB,
341341
handlers::tests::*,
342-
router::setup_test_router,
343342
services::notifications::MockNotificationsManager,
344343
templates::community::{explore, pagination},
345344
};

ocg-server/src/handlers/community/home.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ mod tests {
7777
use uuid::Uuid;
7878

7979
use crate::{
80-
db::mock::MockDB, handlers::tests::*, router::setup_test_router,
81-
services::notifications::MockNotificationsManager, templates::community::home::Stats,
82-
types::event::EventKind,
80+
db::mock::MockDB, handlers::tests::*, services::notifications::MockNotificationsManager,
81+
templates::community::home::Stats, types::event::EventKind,
8382
};
8483

8584
#[tokio::test]

ocg-server/src/handlers/dashboard/common.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ mod tests {
5050
use tower::ServiceExt;
5151
use uuid::Uuid;
5252

53-
use crate::{
54-
db::mock::MockDB, handlers::tests::*, router::setup_test_router,
55-
services::notifications::MockNotificationsManager,
56-
};
53+
use crate::{db::mock::MockDB, handlers::tests::*, services::notifications::MockNotificationsManager};
5754

5855
#[tokio::test]
5956
async fn test_search_user_success() {

ocg-server/src/handlers/dashboard/community/groups.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ mod tests {
203203
use crate::{
204204
db::{common::SearchCommunityGroupsOutput, mock::MockDB},
205205
handlers::tests::*,
206-
router::setup_test_router,
207206
services::notifications::MockNotificationsManager,
208207
};
209208

ocg-server/src/handlers/dashboard/community/home.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ mod tests {
106106
use crate::{
107107
db::{common::SearchCommunityGroupsOutput, mock::MockDB},
108108
handlers::{dashboard::community::groups::MAX_GROUPS_LISTED, tests::*},
109-
router::setup_test_router,
110109
services::notifications::MockNotificationsManager,
111110
};
112111

ocg-server/src/handlers/dashboard/community/settings.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ mod tests {
6969
use tower::ServiceExt;
7070
use uuid::Uuid;
7171

72-
use crate::{
73-
db::mock::MockDB, handlers::tests::*, router::setup_test_router,
74-
services::notifications::MockNotificationsManager,
75-
};
72+
use crate::{db::mock::MockDB, handlers::tests::*, services::notifications::MockNotificationsManager};
7673

7774
#[tokio::test]
7875
async fn test_update_page_success() {

ocg-server/src/handlers/dashboard/community/team.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ mod tests {
118118
use crate::{
119119
db::mock::MockDB,
120120
handlers::tests::*,
121-
router::setup_test_router,
122121
services::notifications::{MockNotificationsManager, NotificationKind},
123122
templates::notifications::CommunityTeamInvitation as CommunityTeamInvitationTemplate,
124123
};

ocg-server/src/handlers/dashboard/group/attendees.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ mod tests {
5959
use tower::ServiceExt;
6060
use uuid::Uuid;
6161

62-
use crate::{
63-
db::mock::MockDB, handlers::tests::*, router::setup_test_router,
64-
services::notifications::MockNotificationsManager,
65-
};
62+
use crate::{db::mock::MockDB, handlers::tests::*, services::notifications::MockNotificationsManager};
6663

6764
#[tokio::test]
6865
async fn test_list_page_success() {

ocg-server/src/handlers/dashboard/group/events.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ mod tests {
326326
use crate::{
327327
db::mock::MockDB,
328328
handlers::tests::*,
329-
router::setup_test_router,
330329
services::notifications::{MockNotificationsManager, NotificationKind},
331330
templates::notifications::{EventCanceled, EventPublished, EventRescheduled},
332331
types::event::EventSummary,

0 commit comments

Comments
 (0)