Skip to content

Commit

Permalink
test: Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisBurger committed Nov 19, 2024
1 parent de7f0a4 commit 92a96ac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
11 changes: 0 additions & 11 deletions tasky/tests/security/assignment_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fn test_create_assignment_disabled() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -45,7 +44,6 @@ fn test_read_assignment_as_wrong_student() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -72,7 +70,6 @@ fn test_read_assignment_as_student() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -99,7 +96,6 @@ fn test_read_assignment_as_wrong_tutor() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -126,7 +122,6 @@ fn test_read_assignment_as_tutor() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -153,7 +148,6 @@ fn test_read_assignment_as_admin() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -180,7 +174,6 @@ fn test_update_assignment_as_wrong_student() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -207,7 +200,6 @@ fn test_update_assignment_as_student() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -234,7 +226,6 @@ fn test_update_assignment_as_wrong_tutor() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -261,7 +252,6 @@ fn test_update_assignment_as_tutor() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand All @@ -288,7 +278,6 @@ fn test_update_assignment_as_admin() {
group_id: 1,
description: "".to_string(),
language: AssignmentLanguage::Golang,
completed_by: vec![],
file_structure: None,
runner_cmd: "".to_string(),
runner_memory: "".to_string(),
Expand Down
18 changes: 0 additions & 18 deletions tasky/tests/security/group_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ fn test_create_group() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 1,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -35,7 +34,6 @@ fn test_read_group_as_admin() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 1,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -53,7 +51,6 @@ fn test_read_group_as_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 1,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -71,7 +68,6 @@ fn test_read_group_as_wrong_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -89,7 +85,6 @@ fn test_read_group_as_student() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![Some(1)],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -107,7 +102,6 @@ fn test_read_group_as_wrong_student() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -125,7 +119,6 @@ fn test_update_as_admin() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -143,7 +136,6 @@ fn test_update_as_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 1,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -161,7 +153,6 @@ fn test_update_as_wrong_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -179,7 +170,6 @@ fn test_update_as_student() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -197,7 +187,6 @@ fn test_delete_as_admin() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -215,7 +204,6 @@ fn test_delete_as_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 1,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -233,7 +221,6 @@ fn test_delete_as_wrong_tutor() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -251,7 +238,6 @@ fn test_delete_as_student() {
let mut group = Group {
id: 1,
title: "group".to_string(),
members: vec![],
tutor: 2,
join_policy: JoinRequestPolicy::Request,
created_at: NaiveDateTime::parse_from_str("2015-09-05 23:56:04", "%Y-%m-%d %H:%M:%S")
Expand All @@ -269,7 +255,6 @@ fn test_create_create_as_student() {
let mut create = CreateGroup {
title: "".to_string(),
tutor: 1,
members: vec![],
join_policy: JoinRequestPolicy::Request,
};
assert_eq!(create.is_granted(SecurityAction::Create, &user), false);
Expand All @@ -281,7 +266,6 @@ fn test_create_create_as_tutor() {
let mut create = CreateGroup {
title: "".to_string(),
tutor: 1,
members: vec![],
join_policy: JoinRequestPolicy::Request,
};
assert_eq!(create.is_granted(SecurityAction::Create, &user), true);
Expand All @@ -293,7 +277,6 @@ fn test_create_create_as_admin() {
let mut create = CreateGroup {
title: "".to_string(),
tutor: 1,
members: vec![],
join_policy: JoinRequestPolicy::Request,
};
assert_eq!(create.is_granted(SecurityAction::Create, &user), false);
Expand All @@ -305,7 +288,6 @@ fn test_create_create_pending() {
let mut create = CreateGroup {
title: "".to_string(),
tutor: 1,
members: vec![],
join_policy: JoinRequestPolicy::Request,
};
assert_eq!(create.is_granted(SecurityAction::Read, &user), false);
Expand Down

0 comments on commit 92a96ac

Please sign in to comment.