Kết quả khi mình chạy test, mình có dump data để các bạn có thể theo dõi sự thay đổi.
Contract: Partime
√ should have 0 total part time job
Job's details:
id: 0
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 0
end: 0
timeOut: 1527764451
title: This is title #0
description: This is description #0
labor: 0x0000000000000000000000000000000000000000
undefined: false
√ creator should able to add new job (110ms)
√ anonymous actor should not able to cancel created job (63ms)
Job's details:
id: 0
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 0
end: 1527332451
timeOut: 1527764451
title: This is title #0
description: This is description #0
labor: 0x0000000000000000000000000000000000000000
undefined: false
√ creator should able to cancel his created job (110ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 0
end: 0
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x0000000000000000000000000000000000000000
undefined: false
√ creator should able to add new job (110ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 1527332451
end: 0
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x2bd2150ba578a4cd3293383f72e7d8e8de11f548
undefined: false
√ labor should able to take available job (123ms)
√ anonymous actor should not able to mark job as done (65ms)
√ anonymous actor should not able to mark job as failed (47ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 0
end: 0
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x0000000000000000000000000000000000000000
undefined: false
√ labor actor should able to mark job as failed (250ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 1527332452
end: 0
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x2bd2150ba578a4cd3293383f72e7d8e8de11f548
undefined: false
√ labor should able to take available job again (110ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 1527332452
end: 1527332452
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x2bd2150ba578a4cd3293383f72e7d8e8de11f548
undefined: false
√ labor actor should able to mark job as done (141ms)
√ anonymous actor should not able to pay for labor (46ms)
Job's details:
id: 1
creator: 0x4a8be21d76a3003bf62513907b3a460957086caf
salary: 1000000000000000000
start: 1527332452
end: 1527332452
timeOut: 1527764451
title: This is title #1
description: This is description #1
labor: 0x2bd2150ba578a4cd3293383f72e7d8e8de11f548
undefined: true
√ creator should able to pay for labor (141ms)
13 passing (2s)