Fix dev_data Command for testing
This commit is contained in:
parent
6d138af016
commit
1bc56016e7
1 changed files with 33 additions and 21 deletions
|
@ -28,46 +28,58 @@ sub run {
|
||||||
$schema->resultset('User')->create({
|
$schema->resultset('User')->create({
|
||||||
email => 'test@example.com',
|
email => 'test@example.com',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
entity => {
|
||||||
|
type => 'customer',
|
||||||
customer => {
|
customer => {
|
||||||
full_name => 'Test User',
|
full_name => 'Test User',
|
||||||
display_name => 'Test User',
|
display_name => 'Test User',
|
||||||
year_of_birth => 2006,
|
year_of_birth => 2006,
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
administrator => {},
|
is_admin => 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
$schema->resultset('User')->create({
|
$schema->resultset('User')->create({
|
||||||
email => 'test2@example.com',
|
email => 'test2@example.com',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
entity => {
|
||||||
|
type => 'customer',
|
||||||
customer => {
|
customer => {
|
||||||
full_name => 'Test User 2',
|
full_name => 'Test User 2',
|
||||||
display_name => 'Test User 2',
|
display_name => 'Test User 2',
|
||||||
year_of_birth => 2006,
|
year_of_birth => 2006,
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
$schema->resultset('User')->create({
|
$schema->resultset('User')->create({
|
||||||
email => 'test3@example.com',
|
email => 'test3@example.com',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
entity => {
|
||||||
|
type => 'customer',
|
||||||
customer => {
|
customer => {
|
||||||
full_name => 'Test User 3',
|
full_name => 'Test User 3',
|
||||||
display_name => 'Test User 3',
|
display_name => 'Test User 3',
|
||||||
year_of_birth => 2006,
|
year_of_birth => 2006,
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
$schema->resultset('User')->create({
|
$schema->resultset('User')->create({
|
||||||
email => 'testorg@example.com',
|
email => 'testorg@example.com',
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
|
entity => {
|
||||||
|
type => 'organisation',
|
||||||
organisation => {
|
organisation => {
|
||||||
name => 'Test Org',
|
name => 'Test Org',
|
||||||
street_name => 'Test Street',
|
street_name => 'Test Street',
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue