Tests fixed

This commit is contained in:
Finn 2017-08-25 15:47:54 +01:00
parent ef2e0627e1
commit 6cdc8891c3
9 changed files with 13 additions and 0 deletions

View file

@ -21,6 +21,7 @@ $schema->resultset('Organisation')->create({
name => 'Shinra Electric Power Company',
street_name => 'Sector 0, Midgar, Eastern Continent',
town => 'Gaia',
sector => 'A',
postcode => 'WC1E 6AD',
});
@ -53,6 +54,7 @@ $t->post_ok('/admin/organisations/valid/1/edit', form => {
name => 'Shinra Electric Power Company',
street_name => 'Sector 0, Midgar, Eastern Continent',
town => 'Gaia',
sector => 'A',
postcode => 'WC1E 6AD',
})->status_is(200)->content_like(qr/Updated Organisation/);
@ -60,6 +62,7 @@ $t->post_ok('/admin/organisations/valid/1/edit', form => {
$t->post_ok('/admin/organisations/valid/1/edit', form => {
name => 'Shinra Electric Power Company',
street_name => 'Sector 0, Midgar, Eastern Continent',
sector => 'A',
postcode => 'WC1E 6AD',
})->content_like(qr/The validation has failed/);
@ -83,6 +86,7 @@ $t->post_ok('/admin/organisations/add/submit', form => {
name => 'Wall Market',
street_name => 'Slums, Sector 6',
town => 'Midgar',
sector => 'A',
postcode => 'TN35 5AQ',
})->status_is(200)->content_like(qr/Added Organisation/);

View file

@ -342,6 +342,7 @@ $testJson = {
'email' => 'org@org.com',
'postcode' => 'LA1 1AA',
'password' => 'Meh',
'sector' => 'A',
};
$t->post_ok('/api/register' => json => $testJson)
->status_is(400)
@ -360,6 +361,7 @@ $testJson = {
'password' => 'Meh',
'street_name' => 'mary lane testing....',
'town' => 'Lancaster',
'sector' => 'A',
};
$t->post_ok('/api/register' => json => $testJson)
->status_is(200)

View file

@ -55,6 +55,7 @@ $testJson = {
'password' => $passwordBilly,
'street_name' => 'Market St',
'town' => 'Lancaster',
'sector' => 'A',
};
$t->post_ok('/api/register' => json => $testJson)
->status_is(200)

View file

@ -28,6 +28,7 @@ my $org = {
town => 'Lancaster',
postcode => 'LA1 1AA',
password => 'abc123',
sector => 'A',
};
$schema->resultset('AccountToken')->create({ name => $user->{token} });

View file

@ -56,6 +56,7 @@ my $org = {
name => 'Test Org',
street_name => 'Test Street',
town => 'Lancaster',
sector => 'A',
postcode => 'LA1 1AA',
password => 'abc123',
};

View file

@ -81,6 +81,7 @@ $testJson = {
'password' => $passwordBilly,
'street_name' => 'Chocobo Farm, Eastern Continent',
'town' => 'Gaia',
'sector' => 'A',
};
$t->post_ok('/api/register' => json => $testJson)
->status_is(200)

View file

@ -58,6 +58,7 @@ my $org = {
town => 'Lancaster',
postcode => 'LA1 1AA',
password => 'abc123',
sector => 'A',
};
$schema->resultset('AccountToken')->create({ name => $_->{token} })

View file

@ -58,6 +58,7 @@ my $org = {
town => 'Lancaster',
postcode => 'LA1 1AA',
password => 'abc123',
sector => 'A',
};
$schema->resultset('AccountToken')->create({ name => $_->{token} })

View file

@ -58,6 +58,7 @@ my $org = {
town => 'Lancaster',
postcode => 'LA1 1AA',
password => 'abc123',
sector => 'A',
};
$schema->resultset('AccountToken')->create({ name => $_->{token} })