-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,7 +421,7 @@ mod tests { | |
let user_id = "570DC079-664A-4496-BAA3-668C445A447"; | ||
// create fake user - used as FOREIGN KEY in media | ||
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)") | ||
.bind(user_id.clone()) | ||
.bind(user_id) | ||
.bind("[email protected]") | ||
.bind("unsecure") | ||
.bind("Stuermer") | ||
|
@@ -437,7 +437,7 @@ mod tests { | |
|
||
// when | ||
let media_item_result = db | ||
.create_media_item(user_id.clone(), name, date_taken) | ||
.create_media_item(user_id, name, date_taken) | ||
.await; | ||
|
||
// then | ||
|
@@ -459,16 +459,16 @@ mod tests { | |
|
||
// create fake user - used as FOREIGN KEY in media | ||
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)") | ||
.bind(user_id.clone()) | ||
.bind(user_id) | ||
.bind("[email protected]") | ||
.bind("unsecure") | ||
.bind("Stuermer") | ||
.bind("Benjamin") | ||
.execute(&pool).await?; | ||
|
||
sqlx::query("INSERT INTO media (uuid, owner, name, is_sensitive, added_at, taken_at) VALUES ($1, $2, $3, $4, $5, $6)") | ||
.bind(media_id.clone()) | ||
.bind(user_id.clone()) | ||
.bind(media_id) | ||
.bind(user_id) | ||
.bind("DSC_1234") | ||
.bind(false) | ||
.bind(added_at) | ||
|
@@ -481,7 +481,7 @@ mod tests { | |
.await; | ||
|
||
// when | ||
let media_item_result = db.create_media_item(user_id.clone(), name, taken_at).await; | ||
let media_item_result = db.create_media_item(user_id, name, taken_at).await; | ||
|
||
// then | ||
assert!(media_item_result.is_ok()); | ||
|
@@ -501,16 +501,16 @@ mod tests { | |
let taken_at = OffsetDateTime::parse("2023-01-01T13:37:01.234567Z", &Rfc3339).unwrap(); | ||
// create fake user - used as FOREIGN KEY in reference | ||
sqlx::query("INSERT INTO users (uuid, email, password, lastname, firstname) VALUES ($1, $2, $3, $4, $5)") | ||
.bind(user_id.clone()) | ||
.bind(user_id) | ||
.bind("[email protected]") | ||
.bind("unsecure") | ||
.bind("Stuermer") | ||
.bind("Benjamin") | ||
.execute(&pool).await?; | ||
// create fake media item - used as FOREIGN KEY in reference | ||
sqlx::query("INSERT INTO media (uuid, owner, name, is_sensitive, added_at, taken_at) VALUES ($1, $2, $3, $4, $5, $6)") | ||
.bind(media_id.clone()) | ||
.bind(user_id.clone()) | ||
.bind(media_id) | ||
.bind(user_id) | ||
.bind("DSC_1234") | ||
.bind(false) | ||
.bind(added_at) | ||
|
@@ -540,7 +540,7 @@ mod tests { | |
|
||
// when | ||
let add_reference_result = db | ||
.add_reference(user_id.clone(), media_id.clone(), &reference) | ||
.add_reference(user_id, media_id, &reference) | ||
.await; | ||
|
||
// then | ||
|