Skip to content

Commit

Permalink
Manual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charleschege committed Jan 11, 2022
1 parent 964c841 commit 7b064b3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/timestamp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,39 @@ async fn main() -> Result<(), DbErr> {

let ctx = TestContext::new("bakery_chain_schema_timestamp_utc_tests").await;
create_tables(&ctx.db).await?;
let create_satellites_table = sea_query::Table::create()
.table(datetimeutc::Entity)
.col(
ColumnDef::new(datetimeutc::Column::Id)
.integer()
.not_null()
.auto_increment()
.primary_key(),
)
.col(
ColumnDef::new(datetimeutc::Column::SatelliteName)
.string()
.not_null(),
)
.col(
ColumnDef::new(datetimeutc::Column::LaunchDate)
.timestamp_with_time_zone()
.not_null(),
)
.col(
ColumnDef::new(datetimeutc::Column::DeploymentDate)
.timestamp_with_time_zone()
.not_null(),
)
.if_not_exists()
.to_owned();

ctx.db
.execute(Statement::from_string(
DatabaseBackend::MySql,
create_satellites_table.to_string(MysqlQueryBuilder),
))
.await;
create_satellites_log(&ctx.db).await?;

ctx.delete().await;
Expand Down

0 comments on commit 7b064b3

Please sign in to comment.