Tests fixed
This commit is contained in:
parent
ef2e0627e1
commit
6cdc8891c3
9 changed files with 13 additions and 0 deletions
|
@ -21,6 +21,7 @@ $schema->resultset('Organisation')->create({
|
||||||
name => 'Shinra Electric Power Company',
|
name => 'Shinra Electric Power Company',
|
||||||
street_name => 'Sector 0, Midgar, Eastern Continent',
|
street_name => 'Sector 0, Midgar, Eastern Continent',
|
||||||
town => 'Gaia',
|
town => 'Gaia',
|
||||||
|
sector => 'A',
|
||||||
postcode => 'WC1E 6AD',
|
postcode => 'WC1E 6AD',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ $t->post_ok('/admin/organisations/valid/1/edit', form => {
|
||||||
name => 'Shinra Electric Power Company',
|
name => 'Shinra Electric Power Company',
|
||||||
street_name => 'Sector 0, Midgar, Eastern Continent',
|
street_name => 'Sector 0, Midgar, Eastern Continent',
|
||||||
town => 'Gaia',
|
town => 'Gaia',
|
||||||
|
sector => 'A',
|
||||||
postcode => 'WC1E 6AD',
|
postcode => 'WC1E 6AD',
|
||||||
})->status_is(200)->content_like(qr/Updated Organisation/);
|
})->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 => {
|
$t->post_ok('/admin/organisations/valid/1/edit', form => {
|
||||||
name => 'Shinra Electric Power Company',
|
name => 'Shinra Electric Power Company',
|
||||||
street_name => 'Sector 0, Midgar, Eastern Continent',
|
street_name => 'Sector 0, Midgar, Eastern Continent',
|
||||||
|
sector => 'A',
|
||||||
postcode => 'WC1E 6AD',
|
postcode => 'WC1E 6AD',
|
||||||
})->content_like(qr/The validation has failed/);
|
})->content_like(qr/The validation has failed/);
|
||||||
|
|
||||||
|
@ -83,6 +86,7 @@ $t->post_ok('/admin/organisations/add/submit', form => {
|
||||||
name => 'Wall Market',
|
name => 'Wall Market',
|
||||||
street_name => 'Slums, Sector 6',
|
street_name => 'Slums, Sector 6',
|
||||||
town => 'Midgar',
|
town => 'Midgar',
|
||||||
|
sector => 'A',
|
||||||
postcode => 'TN35 5AQ',
|
postcode => 'TN35 5AQ',
|
||||||
})->status_is(200)->content_like(qr/Added Organisation/);
|
})->status_is(200)->content_like(qr/Added Organisation/);
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,7 @@ $testJson = {
|
||||||
'email' => 'org@org.com',
|
'email' => 'org@org.com',
|
||||||
'postcode' => 'LA1 1AA',
|
'postcode' => 'LA1 1AA',
|
||||||
'password' => 'Meh',
|
'password' => 'Meh',
|
||||||
|
'sector' => 'A',
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/register' => json => $testJson)
|
$t->post_ok('/api/register' => json => $testJson)
|
||||||
->status_is(400)
|
->status_is(400)
|
||||||
|
@ -360,6 +361,7 @@ $testJson = {
|
||||||
'password' => 'Meh',
|
'password' => 'Meh',
|
||||||
'street_name' => 'mary lane testing....',
|
'street_name' => 'mary lane testing....',
|
||||||
'town' => 'Lancaster',
|
'town' => 'Lancaster',
|
||||||
|
'sector' => 'A',
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/register' => json => $testJson)
|
$t->post_ok('/api/register' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
|
|
@ -55,6 +55,7 @@ $testJson = {
|
||||||
'password' => $passwordBilly,
|
'password' => $passwordBilly,
|
||||||
'street_name' => 'Market St',
|
'street_name' => 'Market St',
|
||||||
'town' => 'Lancaster',
|
'town' => 'Lancaster',
|
||||||
|
'sector' => 'A',
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/register' => json => $testJson)
|
$t->post_ok('/api/register' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
|
|
@ -28,6 +28,7 @@ my $org = {
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
sector => 'A',
|
||||||
};
|
};
|
||||||
|
|
||||||
$schema->resultset('AccountToken')->create({ name => $user->{token} });
|
$schema->resultset('AccountToken')->create({ name => $user->{token} });
|
||||||
|
|
|
@ -56,6 +56,7 @@ my $org = {
|
||||||
name => 'Test Org',
|
name => 'Test Org',
|
||||||
street_name => 'Test Street',
|
street_name => 'Test Street',
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
|
sector => 'A',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,6 +81,7 @@ $testJson = {
|
||||||
'password' => $passwordBilly,
|
'password' => $passwordBilly,
|
||||||
'street_name' => 'Chocobo Farm, Eastern Continent',
|
'street_name' => 'Chocobo Farm, Eastern Continent',
|
||||||
'town' => 'Gaia',
|
'town' => 'Gaia',
|
||||||
|
'sector' => 'A',
|
||||||
};
|
};
|
||||||
$t->post_ok('/api/register' => json => $testJson)
|
$t->post_ok('/api/register' => json => $testJson)
|
||||||
->status_is(200)
|
->status_is(200)
|
||||||
|
|
|
@ -58,6 +58,7 @@ my $org = {
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
sector => 'A',
|
||||||
};
|
};
|
||||||
|
|
||||||
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
||||||
|
|
|
@ -58,6 +58,7 @@ my $org = {
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
sector => 'A',
|
||||||
};
|
};
|
||||||
|
|
||||||
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
||||||
|
|
|
@ -58,6 +58,7 @@ my $org = {
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
sector => 'A',
|
||||||
};
|
};
|
||||||
|
|
||||||
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
$schema->resultset('AccountToken')->create({ name => $_->{token} })
|
||||||
|
|
Reference in a new issue