Navigation Menu

Skip to content

Commit

Permalink
test: Add tests for ".json" suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 28, 2014
1 parent 70612e3 commit c023fd8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/adapter/api/groonga/load.test.js
Expand Up @@ -62,6 +62,38 @@ suite('adapter/api/groonga: load', function() {
};

suite('success', function() {
suite('URL suffix', function() {
test('nothing', function(done) {
pushSuccessResponse();
var body = [
]
utils.post('/d/load?table=Users', JSON.stringify(body))
.next(function(response) {
try {
assert.deepEqual(response.statusCode, 200);
done();
} catch (error) {
done(error);
}
});
});

test('.json', function(done) {
pushSuccessResponse();
var body = [
]
utils.post('/d/load.json?table=Users', JSON.stringify(body))
.next(function(response) {
try {
assert.deepEqual(response.statusCode, 200);
done();
} catch (error) {
done(error);
}
});
});
});

suite('HTTP header', function() {
test('status code', function(done) {
pushSuccessResponse();
Expand Down

0 comments on commit c023fd8

Please sign in to comment.