Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 722b006

Browse files
committed
Fix tests
1 parent f1ec2fe commit 722b006

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/plugins/test_leetcode.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,11 @@ describe('plugin:leetcode', function() {
401401

402402
nock('https://leetcode.com')
403403
.get('/submissions/detail/id1/check/')
404-
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_code": 10}');
404+
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_msg": "Accepted", "submission_id": "interpret_expected_id1"}');
405405

406406
nock('https://leetcode.com')
407407
.get('/submissions/detail/id2/check/')
408-
.reply(200, '{"state": "SUCCESS", "run_success": false, "status_code": 15}');
408+
.reply(200, '{"state": "SUCCESS", "run_success": false, "status_msg": "Runtime Error", "submission_id": "interpret_id2"}');
409409

410410
plugin.testProblem(PROBLEM, function(e, results) {
411411
assert.equal(e, null);
@@ -437,7 +437,7 @@ describe('plugin:leetcode', function() {
437437

438438
nock('https://leetcode.com')
439439
.get('/submissions/detail/id1/check/')
440-
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_code": 10}');
440+
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_msg": "Accepted", "submission_id": "id1"}');
441441

442442
plugin.submitProblem(PROBLEM, function(e, results) {
443443
assert.equal(e, null);
@@ -460,7 +460,7 @@ describe('plugin:leetcode', function() {
460460
.reply(200, '{"state": "STARTED"}');
461461
nock('https://leetcode.com')
462462
.get('/submissions/detail/id1/check/')
463-
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_code": 10}');
463+
.reply(200, '{"state": "SUCCESS", "run_success": true, "status_msg": "Accepted", "submission_id": "id1"}');
464464

465465
plugin.submitProblem(PROBLEM, function(e, results) {
466466
assert.equal(e, null);

0 commit comments

Comments
 (0)