aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-19 23:10:53 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-19 23:10:53 -0600
commit88d527d574567420d7aa72f37205bd6b345b8dd7 (patch)
tree4cbec62f262d29c88b15df02e1d37f003991d99e /tests
parentf2009f7135f92959e919a85a02584d7a0d7b8e47 (diff)
downloadtosin-88d527d574567420d7aa72f37205bd6b345b8dd7.tar.gz
tosin-88d527d574567420d7aa72f37205bd6b345b8dd7.zip
generate diesel::table! in derive(Model)
Diffstat (limited to 'tests')
-rw-r--r--tests/tutorial/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tutorial/mod.rs b/tests/tutorial/mod.rs
index b26aa39..25f251b 100644
--- a/tests/tutorial/mod.rs
+++ b/tests/tutorial/mod.rs
@@ -117,6 +117,8 @@ pub fn urls() -> UrlMap {
// update main.rs
fs::write("src/main.rs", r#"
+#[macro_use] extern crate diesel;
+
use tosin::Settings;
use tosin::contrib::admin;
use tosin::db::backend::Connectable;
@@ -174,6 +176,8 @@ pub fn step2() {
step1();
// update main.rs
fs::write("src/main.rs", r#"
+#[macro_use] extern crate diesel;
+
use tosin::Settings;
use tosin::contrib::admin;
use tosin::db::backend::Connectable;
@@ -217,6 +221,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
+diesel = { version = "1.4.4", features = ["sqlite"] }
time = "0.2.27"
tosin = { path = "/home/cactus/Documents/tosin" }
"#).unwrap();
@@ -250,6 +255,8 @@ gather!();
// update main.rs
fs::write("src/main.rs", r#"
+#[macro_use] extern crate diesel;
+
use tosin::Settings;
use tosin::contrib::admin;
use tosin::db::backend::Connectable;