Fixed user-history test with session refactor
This commit is contained in:
parent
de5e812950
commit
9974e6f07e
1 changed files with 46 additions and 3 deletions
|
@ -117,6 +117,8 @@ sub logout {
|
||||||
->json_is('/success', Mojo::JSON->true);
|
->json_is('/success', Mojo::JSON->true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $session_key;
|
||||||
|
|
||||||
sub login_reno {
|
sub login_reno {
|
||||||
$testJson = {
|
$testJson = {
|
||||||
'email' => $emailReno,
|
'email' => $emailReno,
|
||||||
|
@ -125,6 +127,7 @@ sub login_reno {
|
||||||
$t->post_ok('/api/login' => json => $testJson)
|
$t->post_ok('/api/login' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
->json_is('/success', Mojo::JSON->true);
|
->json_is('/success', Mojo::JSON->true);
|
||||||
|
$session_key = $t->tx->res->json('/session_key');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub login_chocobilly {
|
sub login_chocobilly {
|
||||||
|
@ -135,6 +138,7 @@ sub login_chocobilly {
|
||||||
$t->post_ok('/api/login' => json => $testJson)
|
$t->post_ok('/api/login' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
->json_is('/success', Mojo::JSON->true);
|
->json_is('/success', Mojo::JSON->true);
|
||||||
|
$session_key = $t->tx->res->json('/session_key');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub login_admin {
|
sub login_admin {
|
||||||
|
@ -145,6 +149,7 @@ sub login_admin {
|
||||||
$t->post_ok('/api/login' => json => $testJson)
|
$t->post_ok('/api/login' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
->json_is('/success', Mojo::JSON->true);
|
->json_is('/success', Mojo::JSON->true);
|
||||||
|
$session_key = $t->tx->res->json('/session_key');
|
||||||
}
|
}
|
||||||
|
|
||||||
print "test 5 - Login non-admin Reno\n";
|
print "test 5 - Login non-admin Reno\n";
|
||||||
|
@ -159,7 +164,8 @@ $json = {
|
||||||
organisationName => $nameToTestTurtle,
|
organisationName => $nameToTestTurtle,
|
||||||
streetName => "Town centre",
|
streetName => "Town centre",
|
||||||
town => " Wutai",
|
town => " Wutai",
|
||||||
postcode => "NW1 W01"
|
postcode => "NW1 W01",
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -175,6 +181,7 @@ $json = {
|
||||||
microCurrencyValue => 20,
|
microCurrencyValue => 20,
|
||||||
transactionAdditionType => 2,
|
transactionAdditionType => 2,
|
||||||
addUnvalidatedId => $unvalidatedOrganisationId,
|
addUnvalidatedId => $unvalidatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -186,6 +193,7 @@ $json = {
|
||||||
microCurrencyValue => 40,
|
microCurrencyValue => 40,
|
||||||
transactionAdditionType => 2,
|
transactionAdditionType => 2,
|
||||||
addUnvalidatedId => $unvalidatedOrganisationId,
|
addUnvalidatedId => $unvalidatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -206,6 +214,7 @@ $json = {
|
||||||
microCurrencyValue => 80,
|
microCurrencyValue => 80,
|
||||||
transactionAdditionType => 2,
|
transactionAdditionType => 2,
|
||||||
addUnvalidatedId => $unvalidatedOrganisationId,
|
addUnvalidatedId => $unvalidatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -226,6 +235,7 @@ $json = {
|
||||||
microCurrencyValue => 160,
|
microCurrencyValue => 160,
|
||||||
transactionAdditionType => 2,
|
transactionAdditionType => 2,
|
||||||
addUnvalidatedId => $unvalidatedOrganisationId,
|
addUnvalidatedId => $unvalidatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -244,6 +254,7 @@ login_admin();
|
||||||
print "test 17 - Admin approves Turtle\'s Paradise.\n";
|
print "test 17 - Admin approves Turtle\'s Paradise.\n";
|
||||||
$json = {
|
$json = {
|
||||||
unvalidatedOrganisationId => $unvalidatedOrganisationId,
|
unvalidatedOrganisationId => $unvalidatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/admin-approve' => json => $json)
|
$t->post_ok('/api/admin-approve' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -263,6 +274,7 @@ $json = {
|
||||||
microCurrencyValue => 320,
|
microCurrencyValue => 320,
|
||||||
transactionAdditionType => 1,
|
transactionAdditionType => 1,
|
||||||
addValidatedId => $validatedOrganisationId,
|
addValidatedId => $validatedOrganisationId,
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
my $upload = {json => Mojo::JSON::encode_json($json), file2 => {file => './t/test.jpg'}};
|
||||||
$t->post_ok('/api/upload' => form => $upload )
|
$t->post_ok('/api/upload' => form => $upload )
|
||||||
|
@ -283,15 +295,16 @@ login_reno();
|
||||||
|
|
||||||
print "test 23 - No JSON\n";
|
print "test 23 - No JSON\n";
|
||||||
$t->post_ok('/api/user-history')
|
$t->post_ok('/api/user-history')
|
||||||
->status_is(400)
|
->status_is(401)
|
||||||
->json_is('/success', Mojo::JSON->false)
|
->json_is('/success', Mojo::JSON->false)
|
||||||
->content_like(qr/JSON is missing/i);
|
->json_like('/message', qr/Invalid Session/);
|
||||||
|
|
||||||
print "test 24 - retrieveType is missing\n";
|
print "test 24 - retrieveType is missing\n";
|
||||||
$json = {
|
$json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -304,6 +317,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -316,6 +330,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -329,6 +344,7 @@ $json = {
|
||||||
retrieveType => 1,
|
retrieveType => 1,
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -341,6 +357,7 @@ $json = {
|
||||||
dayNumber => "A",
|
dayNumber => "A",
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -352,6 +369,7 @@ $json = {
|
||||||
retrieveType => 1,
|
retrieveType => 1,
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -364,6 +382,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => "ABC",
|
monthNumber => "ABC",
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -375,6 +394,7 @@ $json = {
|
||||||
retrieveType => 1,
|
retrieveType => 1,
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -387,6 +407,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => "I1",
|
year => "I1",
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -399,6 +420,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => ($dateTimePlusThreeDays->month() + 13),
|
monthNumber => ($dateTimePlusThreeDays->month() + 13),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -415,6 +437,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -430,6 +453,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -445,6 +469,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -460,6 +485,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -474,6 +500,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -489,6 +516,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -504,6 +532,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -520,6 +549,7 @@ $json = {
|
||||||
startYear => $dateTimeInitial->year(),
|
startYear => $dateTimeInitial->year(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -535,6 +565,7 @@ $json = {
|
||||||
endDayNumber => "2EF",
|
endDayNumber => "2EF",
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -549,6 +580,7 @@ $json = {
|
||||||
startYear => $dateTimeInitial->year(),
|
startYear => $dateTimeInitial->year(),
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -564,6 +596,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => "A5G",
|
endMonthNumber => "A5G",
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -578,6 +611,7 @@ $json = {
|
||||||
startYear => $dateTimeInitial->year(),
|
startYear => $dateTimeInitial->year(),
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -593,6 +627,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => "ABC",
|
endYear => "ABC",
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -608,6 +643,7 @@ $json = {
|
||||||
endDayNumber => ($dateTimePlusOneYear->day() - 60),
|
endDayNumber => ($dateTimePlusOneYear->day() - 60),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -622,6 +658,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusThreeDays->day(),
|
dayNumber => $dateTimePlusThreeDays->day(),
|
||||||
monthNumber => $dateTimePlusThreeDays->month(),
|
monthNumber => $dateTimePlusThreeDays->month(),
|
||||||
year => $dateTimePlusThreeDays->year(),
|
year => $dateTimePlusThreeDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -639,6 +676,7 @@ $json = {
|
||||||
dayNumber => $dateTimeInitial->day(),
|
dayNumber => $dateTimeInitial->day(),
|
||||||
monthNumber => $dateTimeInitial->month(),
|
monthNumber => $dateTimeInitial->month(),
|
||||||
year => $dateTimeInitial->year(),
|
year => $dateTimeInitial->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -656,6 +694,7 @@ $json = {
|
||||||
dayNumber => $dateTimePlusTwoDays->day(),
|
dayNumber => $dateTimePlusTwoDays->day(),
|
||||||
monthNumber => $dateTimePlusTwoDays->month(),
|
monthNumber => $dateTimePlusTwoDays->month(),
|
||||||
year => $dateTimePlusTwoDays->year(),
|
year => $dateTimePlusTwoDays->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -676,6 +715,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneMonthMinusOneDay->day(),
|
endDayNumber => $dateTimePlusOneMonthMinusOneDay->day(),
|
||||||
endMonthNumber => $dateTimePlusOneMonthMinusOneDay->month(),
|
endMonthNumber => $dateTimePlusOneMonthMinusOneDay->month(),
|
||||||
endYear => $dateTimePlusOneMonthMinusOneDay->year(),
|
endYear => $dateTimePlusOneMonthMinusOneDay->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -698,6 +738,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneMonthMinusOneDay->day(),
|
endDayNumber => $dateTimePlusOneMonthMinusOneDay->day(),
|
||||||
endMonthNumber => $dateTimePlusOneMonthMinusOneDay->month(),
|
endMonthNumber => $dateTimePlusOneMonthMinusOneDay->month(),
|
||||||
endYear => $dateTimePlusOneMonthMinusOneDay->year(),
|
endYear => $dateTimePlusOneMonthMinusOneDay->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -721,6 +762,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
@ -747,6 +789,7 @@ $json = {
|
||||||
endDayNumber => $dateTimePlusOneYear->day(),
|
endDayNumber => $dateTimePlusOneYear->day(),
|
||||||
endMonthNumber => $dateTimePlusOneYear->month(),
|
endMonthNumber => $dateTimePlusOneYear->month(),
|
||||||
endYear => $dateTimePlusOneYear->year(),
|
endYear => $dateTimePlusOneYear->year(),
|
||||||
|
session_key => $session_key,
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/user-history' => json => $json)
|
$t->post_ok('/api/user-history' => json => $json)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
|
Reference in a new issue