Fix dev_data Command for testing

This commit is contained in:
Tom Bloor 2017-11-23 16:52:52 +00:00
parent d718cfee42
commit 9d8db81f2f

View file

@ -28,45 +28,57 @@ sub run {
$schema->resultset('User')->create({ $schema->resultset('User')->create({
email => 'test@example.com', email => 'test@example.com',
password => 'abc123', password => 'abc123',
customer => { entity => {
full_name => 'Test User', type => 'customer',
display_name => 'Test User', customer => {
year_of_birth => 2006, full_name => 'Test User',
postcode => 'LA1 1AA', display_name => 'Test User',
year_of_birth => 2006,
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',
customer => { entity => {
full_name => 'Test User 2', type => 'customer',
display_name => 'Test User 2', customer => {
year_of_birth => 2006, full_name => 'Test User 2',
postcode => 'LA1 1AA', display_name => 'Test User 2',
year_of_birth => 2006,
postcode => 'LA1 1AA',
},
}, },
}); });
$schema->resultset('User')->create({ $schema->resultset('User')->create({
email => 'test3@example.com', email => 'test3@example.com',
password => 'abc123', password => 'abc123',
customer => { entity => {
full_name => 'Test User 3', type => 'customer',
display_name => 'Test User 3', customer => {
year_of_birth => 2006, full_name => 'Test User 3',
postcode => 'LA1 1AA', display_name => 'Test User 3',
year_of_birth => 2006,
postcode => 'LA1 1AA',
},
}, },
}); });
$schema->resultset('User')->create({ $schema->resultset('User')->create({
email => 'testorg@example.com', email => 'testorg@example.com',
password => 'abc123', password => 'abc123',
organisation => { entity => {
name => 'Test Org', type => 'organisation',
street_name => 'Test Street', organisation => {
town => 'Lancaster', name => 'Test Org',
postcode => 'LA1 1AA', street_name => 'Test Street',
town => 'Lancaster',
postcode => 'LA1 1AA',
},
}, },
}); });
} }