-
-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend truncate and seed hooks to accept app context (#1158)
* Extend truncate and seed hooks to accept app context instead of DB context * fix demo * docs * more docs + snap
- Loading branch information
1 parent
b4abb30
commit f72a6bd
Showing
25 changed files
with
85 additions
and
88 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
|
@@ -61,7 +61,7 @@ async fn handle_create_with_password_with_duplicate() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let new_user: Result<Model, ModelError> = Model::create_with_password( | ||
&boot.app_context.db, | ||
|
@@ -81,7 +81,7 @@ async fn can_find_by_email() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let existing_user = Model::find_by_email(&boot.app_context.db, "[email protected]").await; | ||
let non_existing_user_results = | ||
|
@@ -97,7 +97,7 @@ async fn can_find_by_pid() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let existing_user = | ||
Model::find_by_pid(&boot.app_context.db, "11111111-1111-1111-1111-111111111111").await; | ||
|
@@ -114,7 +114,7 @@ async fn can_verification_token() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let user = Model::find_by_pid(&boot.app_context.db, "11111111-1111-1111-1111-111111111111") | ||
.await | ||
|
@@ -143,7 +143,7 @@ async fn can_set_forgot_password_sent() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let user = Model::find_by_pid(&boot.app_context.db, "11111111-1111-1111-1111-111111111111") | ||
.await | ||
|
@@ -172,7 +172,7 @@ async fn can_verified() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let user = Model::find_by_pid(&boot.app_context.db, "11111111-1111-1111-1111-111111111111") | ||
.await | ||
|
@@ -199,7 +199,7 @@ async fn can_reset_password() { | |
configure_insta!(); | ||
|
||
let boot = boot_test::<App>().await.unwrap(); | ||
seed::<App>(&boot.app_context.db).await.unwrap(); | ||
seed::<App>(&boot.app_context).await.unwrap(); | ||
|
||
let user = Model::find_by_pid(&boot.app_context.db, "11111111-1111-1111-1111-111111111111") | ||
.await | ||
|
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.