Mvolz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/195025

Change subject: [WIP] Fix acceptLanguage commit
......................................................................

[WIP] Fix acceptLanguage commit

Change-Id: I93f8c699e7f58375e4fa8dd7c48dd721969e3659
---
M test/index.js
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/25/195025/1

diff --git a/test/index.js b/test/index.js
index 8a5b414..e36787f 100644
--- a/test/index.js
+++ b/test/index.js
@@ -48,7 +48,6 @@
 
        it('should scrape info successfully', function(done) {
                citoidService.request(opts, function(error, responseCode, 
citation){
-                       if (error) {throw error;}
                        if (responseCode !== 200){
                                throw new Error('Not successful: Response code 
is' + responseCode);
                        }
@@ -78,7 +77,7 @@
        it('should return 520 error and citation', function(done) {
                citoidService.request(opts, function(error, responseCode, 
citation){
                        if (responseCode !== 520){
-                               throw new Error('Should throw 520: Response 
code is' + responseCode);
+                               throw new Error('Should throw 520: Response 
code is ' + responseCode);
                        }
                        if (!citation) {throw new Error ('Empty body');}
                        if (citation[0].title !== expectedTitle){
@@ -101,13 +100,12 @@
                format : 'mediawiki',
                acceptLanguage : 'de'
                },
-               expectedTitle = 'Willkommen bei Twitter - Anmelden oder 
Registrieren';
+               expectedTitle = 'illkommen bei Twitter - Anmelden oder 
Registrieren';
 
        it('should return the citation for twitter in German', function(done) {
                citoidService.request(opts, function(error, responseCode, 
citation){
-                       if (responseCode !== 520){
-                               throw new Error('Should throw 520: Response 
code is' +
-                                       responseCode);
+                       if (responseCode !== 200){
+                               throw new Error('Should respond 200: Response 
code is ' + responseCode);
                        }
                        if (!citation) {throw new Error ('Empty body');}
                        if (citation[0].title !== expectedTitle){

-- 
To view, visit https://gerrit.wikimedia.org/r/195025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93f8c699e7f58375e4fa8dd7c48dd721969e3659
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
Gerrit-Branch: master
Gerrit-Owner: Mvolz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to