File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,19 @@ describe('Score', function () {
2121 teacher = await Teacher . deploy ( score . address )
2222
2323 // 设置wallet1为teacher
24- await score . setTeacher ( wallet . address )
24+ await score . setTeacher ( teacher . address )
2525 } )
2626
2727 it ( 'only teacher can modify score' , async function ( ) {
28- await expect ( score . connect ( wallet2 ) . setScore ( wallet3 . address , 99 ) ) . to . be . revertedWith ( 'Score: NOT_TEACHER' )
28+ await expect ( score . setScore ( wallet3 . address , 99 ) ) . to . be . revertedWith ( 'Score: NOT_TEACHER' )
2929 } )
3030
3131 it ( 'score must be below 100' , async function ( ) {
32- await expect ( score . setScore ( wallet3 . address , 101 ) ) . to . be . revertedWith ( 'Score: INVALID_SCORE' )
32+ await expect ( teacher . setScore ( wallet3 . address , 101 ) ) . to . be . revertedWith ( 'Score: INVALID_SCORE' )
3333 } )
3434
3535 it ( 'score must be set correct' , async function ( ) {
36- await score . setScore ( wallet3 . address , 98 )
36+ await teacher . setScore ( wallet3 . address , 98 )
3737 expect ( await score . studentScore ( wallet3 . address ) ) . to . be . equal ( 98 )
3838 } )
3939} )
You can’t perform that action at this time.
0 commit comments