Clean code.

This commit is contained in:
Lars Jung 2015-04-25 17:29:15 +02:00
parent 1a47a2aa3b
commit d5a0dce27a
6 changed files with 12 additions and 12 deletions

View file

@ -20,7 +20,7 @@ modulejs.define('boot', ['$'], function ($) {
$.ajax({
url: url,
data: data,
type: 'POST',
type: 'post',
dataType: 'json'
}).done(function (config) {

View file

@ -9,7 +9,7 @@ modulejs.define('core/server', ['_', '$', 'config', 'core/location'], function (
$.ajax({
url: location.getAbsHref(),
data: data,
type: 'POST',
type: 'post',
dataType: 'json'
})
.done(function (json) {

View file

@ -110,8 +110,8 @@ modulejs.define('main/info', ['$', 'config'], function ($, config) {
$.ajax({
url: 'server/php/index.php',
type: 'POST',
dataType: 'JSON',
type: 'post',
dataType: 'json',
data: data
})
.always(function () {

View file

@ -112,7 +112,7 @@ describe('module \'' + ID + '\'', function () {
assert.isTrue(this.xAjax.calledOnce);
assert.strictEqual(this.xAjax.lastCall.args[0].url, 'server/php/index.php');
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'POST');
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'post');
assert.strictEqual(this.xAjax.lastCall.args[0].dataType, 'json');
assert.isTrue(this.xAjaxResult.done.calledOnce);
@ -134,7 +134,7 @@ describe('module \'' + ID + '\'', function () {
assert.isTrue(this.xAjax.calledOnce);
assert.strictEqual(this.xAjax.lastCall.args[0].url, '.');
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'POST');
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'post');
assert.strictEqual(this.xAjax.lastCall.args[0].dataType, 'json');
assert.isTrue(this.xAjaxResult.done.calledOnce);

View file

@ -200,7 +200,7 @@ describe('module \'' + ID + '\'', function () {
assert.deepEqual(this.xAjax.lastCall.args, [{
url: this.xAbsHref,
data: xData,
type: 'POST',
type: 'post',
dataType: 'json'
}]);
assert.isTrue(this.xAjaxResult.done.calledOnce);
@ -229,7 +229,7 @@ describe('module \'' + ID + '\'', function () {
assert.deepEqual(this.xAjax.lastCall.args, [{
url: this.xAbsHref,
data: xData,
type: 'POST',
type: 'post',
dataType: 'json'
}]);
assert.isTrue(this.xAjaxResult.done.calledOnce);

View file

@ -139,8 +139,8 @@ describe('module \'' + ID + '\'', function () {
assert.isTrue(this.xAjax.calledOnce);
assert.deepEqual(this.xAjax.lastCall.args, [{
url: 'server/php/index.php',
type: 'POST',
dataType: 'JSON',
type: 'post',
dataType: 'json',
data: {
action: 'login',
pass: pass
@ -194,8 +194,8 @@ describe('module \'' + ID + '\'', function () {
assert.isTrue(this.xAjax.calledOnce);
assert.deepEqual(this.xAjax.lastCall.args, [{
url: 'server/php/index.php',
type: 'POST',
dataType: 'JSON',
type: 'post',
dataType: 'json',
data: {
action: 'logout'
}