-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix callback issues #59
Fix callback issues #59
Conversation
Codecov Report
@@ Coverage Diff @@
## master-rest #59 +/- ##
===============================================
- Coverage 80.31% 79.13% -1.19%
===============================================
Files 11 11
Lines 813 858 +45
===============================================
+ Hits 653 679 +26
- Misses 160 179 +19
Continue to review full report at Codecov.
|
{ | ||
log_message(LOG_LEVEL_WARN, "Callback \"%s\" is not reachable.\n", callback_url); | ||
|
||
u_map_clean(&headers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dvigubas return path'as ir tuo pačiu duplikuotas cleanup kodas - didėja tikimybė ką nors kada nors praleisti. Geriau šitą bloką pakeisti status = false;
o funkcijos gale return status;
.
@@ -141,6 +190,55 @@ describe('Notifications interface', function () { | |||
}); | |||
}); | |||
|
|||
describe('DELETE /notification/callback', function() { | |||
|
|||
it('should return 204 for existing callback deletion', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Šito ir sekančių testų logiką galima supaprastinti. Testai vykdomi iš eilės, o prieš tai buvo registracijos, todėl čia užtenka tiesiog delete nusiųsti. Sekančiam teste irgi užtenka tiesiog vieno delete.
tests-rest/notifications.spec.js
Outdated
}); | ||
}); | ||
|
||
it('should return 404 for existing callback deletion', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not existing?
This pull request is dedicated for issue #44