Added exception for Twitter and OAuth missing options (#3676)
* Added exception for Twitter and OAuth missing configuration information * Updated error codes to INTERNAL_SERVER_ERROR, code 1
This commit is contained in:
committed by
Florent Vilmart
parent
a54f4d43fa
commit
e01b417d3f
@@ -133,4 +133,14 @@ describe('OAuth', function() {
|
||||
done();
|
||||
})
|
||||
});
|
||||
|
||||
it("Should fail with missing options", (done) => {
|
||||
var options = undefined;
|
||||
try {
|
||||
new OAuth(options);
|
||||
} catch (error) {
|
||||
jequal(error.message, 'No options passed to OAuth');
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user