Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stojanov-igor committed Feb 28, 2022
1 parent 01febd0 commit dcf743e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions task/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn create_new_task(){
let mut vec = Vec::new();
vec.push(2);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec, 7, DEADLINE));
});
}
Expand All @@ -30,7 +30,7 @@ fn increase_task_count_when_creating_task(){
let mut vec = Vec::new();
vec.push(2);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec, 7, DEADLINE));

// Assert that count is incremented by 1 after task creation
Expand All @@ -51,7 +51,7 @@ fn increase_task_count_when_creating_two_tasks(){
let mut vec2 = Vec::new();
vec2.push(7);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec2, 99, DEADLINE));

Expand All @@ -75,7 +75,7 @@ fn cant_own_more_tax_than_max_tasks(){
let mut vec1 = Vec::new();
vec1.push(n);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));
}

Expand Down Expand Up @@ -146,7 +146,7 @@ fn start_tasks_assigns_new_current_owner(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -175,7 +175,7 @@ fn start_tasks_assigns_task_to_volunteer(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -204,7 +204,7 @@ fn completing_tasks_assigns_new_current_owner(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -241,7 +241,7 @@ fn only_creator_deletes_task(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -281,7 +281,7 @@ fn only_started_task_can_be_completed(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget, deadline]
// Ensure new task can be created with [signer, description vector, budget, deadline]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -311,7 +311,7 @@ fn when_task_is_removed_ownership_is_cleared(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -354,7 +354,7 @@ fn decrease_task_count_when_removing_task(){
let mut vec = Vec::new();
vec.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec, 8, DEADLINE));

// Get hash of task owned
Expand Down Expand Up @@ -391,7 +391,7 @@ fn increase_profile_reputation_when_task_completed(){
let mut vec1 = Vec::new();
vec1.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec1, 7, DEADLINE));

// Ensure new task is assigned to new current_owner (user 1)
Expand Down Expand Up @@ -428,7 +428,7 @@ fn only_add_reputation_when_task_has_been_completed(){
let mut vec = Vec::new();
vec.push(2);

// Ensure new task can be created with [signer, requirements vector, budget]
// Ensure new task can be created with [signer, description vector, budget]
assert_ok!(Task::create_task(Origin::signed(1), TITLE.to_vec(), vec, 8, DEADLINE));

// Get hash of task owned
Expand Down

0 comments on commit dcf743e

Please sign in to comment.